1. Data entry screen to input data, some in text fields and some in dropdown. Data in these fields could change based on user requirements. Data is extracted at the time of entry to have a matcher during verification.
2. A data screen with a grid and rows of data.
3. I want to be able to verify the data in the cells in the grid and compare to data that was entered in the first screen(via extracted data).
The problem I'm running into is that when I have a row like such:
<
tr
class
=
"rgRow Clickable Highlight"
id
=
"ctl01_ctl00_bodyContent_removedForPrivacy_100__0"
>
<
td
>asdfsdf</
td
>
<
td
> </
td
>
<
td
> </
td
>
<
td
> </
td
>
<
td
> </
td
>
<
td
> </
td
>
</
tr
>
The matching "find element" logic ends up being the data in the cell.
For example it would have a filter for TextContent that contains asdfsdf and tagname of td.
Find logic
Expression = TextContent=^asdfsd,tagname=td
FindLogic = [tagname 'Exact' td] AND [TextContent 'StartsWith' asdfsdf]
This would possibly work if the find logic could use the datadriven value, but I don't see any way of doing this.
This match will only work if that is the data in that cell. If I have a randomly generated string that gets input, this will break the test.
So I'm wondering if it' is possible to target a specific column given I am looking at a specific row?(row 0(based on the id) col = 0 or something) I've seen some postings where this appears to be able to be done via scripted steps, but that would add a bit of work to the process of creating the tests as I have quite a few areas where I run into this case.
7 Answers, 1 is accepted
Thank you for contacting Telerik. Based on what you described, it sounds like you will need to Extract the data from the input field and then use the extracted variable in a Data Driven Find Expression to locate the value and verify it. Notice after our 2012 R2 release, this is all possible without code). The only caveat is that you will have to manually enter the data variable into the “Add coded data variable” field when setting your find expression.
Please let me know if this helps. If not, will need more information about your test scenario. Please provide a copy of your test and access to your application (or a demo site that uses the same features).
Rodney
the Telerik team
Test Studio Trainings
I actually was looking at this problem again before I saw your reply and may have also come up with one possible solution, though it does require a coded step to complete and may be a bit tedious in the long run but here is an example scenario and steps I was planning to take.
Ex: Grid has 2 columns, title and comment.
1. Start Add data to a grid process.(essentially clicking a button to get to the data input area)
2. Generate a random value.
3. Tack on random value to string that will be used for the field being tested(ex: titleCol_1f3c)
4. Save data to a variable
( steps 2,3, and 4 will be part of the same coded step.)
5. Enter string_randval data into the field being tested.
6. repeat steps 3,4,and5 for comments using the random value first generated.
7. Save data.
8. Verify data in grid is accurate based on saved variable data and target of field.
The target(find expression) of the field would be "tagname"-isExactly-"td" and "TextContent"-startsWith-"titleCol"
Let me know your thoughts on this approach.
Thanks!
Thank you for the update. Although your solution may work, I agree that it may be tedious to work with in the long run. Typically, if something can be done without code, I suggest going that route.
Since Test Studio allows you to data-drive your find expressions, I would go the UI route unless at some point adding code becomes the more straight-forward solution.
Rodney
the Telerik team
Test Studio Trainings
Thanks again for your help.
I’m happy you were able to get this working. I've filed a feature request for this functionality. You can follow this link to check the status of the request and vote for its inclusion in future releases.
Rodney
Telerik
Reserve your seat today!