Hi,
I need to find out a swing table's row count, what should I do in the analyze of step "getTable"?
Best Regards!
Xiaosong
Hi,
I need to find out a swing table's row count, what should I do in the analyze of step "getTable"?
Best Regards!
Xiaosong
Hi
Whenever you create a table response map you get a query by name 'rowCount()' in queries view, this would retrieve the number of rows in a table.
Hope this will help you.
Thanks
To lakshminarayana,
But the response map has been created by iTest automaticly.
Hi,
I found out how to do this, I use xpath query as you can see in bellow picture, and it return the correct count.
By Default, iTest will create the queries automatically as per the response.if you can see in the "Queries view" you will see the rowcount() will give the how many rows you have in your command output.
Hope it helps
see attached test case.
I save the getTable() response in a variable. Then I use the query command on the variable in conjunction with the rowCount() query. the getTable action automatically generaates a rowCount() query. Look at the queries view.
I tired to use rowcount() to get the row number as well. I also saved the value to one variable. However in another step, I tired to use it with gget. iTest always complained the variable does not exist.
How to fix this issue?
If you are using the save the variable as global and using it in a same procedure then it will throw the error.
We could use the global variable in other procedures by using gget option. If you are trying to use the variable in the same procedure. We need to take it a local variable and then we need to do eval step and then take it in a global variable to use in other procedures.
Hope it help!!
Regards,
Venkat
Thanks.
so in same procedure, I do not need to mark those saved variable in response analysis to "global "?
Could you please try the below option and see if you could able to take the variable in same procedure:
1. Go to General tab of your test case.
2. Please check the check box " Force all variables to be global" under Execution behavior.
3. Now try to use the global variables in the same procedure.
Regards,
Venkat
I don't have an direct answer for you. Open the Structured Data view. This view contains the XML version of the mapped response. You can create an XPath query that tells you how many rows there are.
No one has followed this question yet.