Highlighted
Absent Member.
Absent Member.
277 views

How to define multiple objects in one screen

Hello, we are building a test script for one Web based application screen where one specific column values need to check.  By using object spy I have defined first row objects and refering same in script code. But to test all rows in column, I need to define same number of objects.

Is there any way if I can change first row object parameters during runtime so it can refer other rows data ?

Any suggestion will be helpful.

0 Likes
1 Reply
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

What type of table is this?  If we're talking standard table classes (WebTable, WbfTable), consider using GetCellData and iterate through each of the rows based on the returned RowCount.

Otherwise if you're doing something with random WebElements (say, each element for Row 1 represents each column value), you could add an index property (ordinal identifier) to each and use .SetTOProperty on the index property to update the index would loosely represents your current row.  I don't recommend this method, but it can work.

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.