Keyword Test - How to verify data value in auto-generated table which contain auto-generated objectI
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Keyword Test - How to verify data value in auto-generated table which contain auto-generated objectI
Hi
Keyword Test - How to verify data value in the auto-generated table which contains auto-generated objectID and objectName
I tried verify property of the whole table and the system includes all expected value in the table. My question is how to verify the value row by row?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The contentText is a delimited string, delimited by carriage returns. You could read it in as such and work through it line by line.
However... that Table, as as web table, has a RowCount property I'm assuming. And Cells... So, if you know the cells you want, you could use a for loop from 0 to RowCount-1 and compare values in the cells.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to use keyword test to get cells'value. I found only scripting example, but I 've no coding skill
https://support.smartbear.com/testcomplete/docs/app-testing/web/general/examples/parsing-html-tables...
Thanks
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just as a note:
While keyword tests are great, I recommend that you learn coding skills for two reasons:
1) Knowing coding logic will help in knowing how to organize tests and run more complicated logic like for loops, if-then, exception handling, etc
2) There are some things that are much more elegant and, even, easier to do in code than in keyword tests. They can be CALLED from keyword tests but the code is much less convoluted.
That said... to obtain a cells value all you need to do is set the parameter type for whatever operation you're executing (logging a message, setting a variable, etc) to "Code expression" and then enter the full object identifier for the cell (Aliases.App.Table.Cell(i, 2)). That should do what you need.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you tristaanogre.
Hi @warinthira , have you tried tristaanogre’s suggestion? Please let us know if you were able to solve this.
Sonya Mihaljova
Community and Education Specialist
