11-02-2017, 07:51 PM
I have tried several online examples for this, but none of them worked.
At my work we have a web based application where the user enters a CODE and is taken to a webpage that has a form with hundreds of objects on it.
Each webpage is unique and actually ALL the possible objects are always on this particular page, some are just not visible and/or enabled.
I need to programatically collect each object name and state (visible, not visible, enabled, disabled) and dump this data to a spreadsheet or a pipe delimited text file (that I will import into Excel).
I have all the possible CODES in the Global Table section of UFT and it will now loop through each CODE and land on the page that I need to collect data from. It currently takes a screenshot but I do not want to go though all 200+ screenshots and manually list each visible item.
I'd rather do it once and collect the data in Excel. Then I can get the developers to sign off on the DOM data I collected as our official Requirements because currently they do not have any requirements to give us. (for real!!).
I'll list below one of the online examples I tried and the error I got. If anyone can help me accomplish this I would appreciate it.
The error I get is "Wrong number of arguments or invalid property assignment: 'ChilObjs'"
And I was just trying to get the name here, not even trying to get whether the object was visible or enabled yet.
Thank you for your time,
At my work we have a web based application where the user enters a CODE and is taken to a webpage that has a form with hundreds of objects on it.
Each webpage is unique and actually ALL the possible objects are always on this particular page, some are just not visible and/or enabled.
I need to programatically collect each object name and state (visible, not visible, enabled, disabled) and dump this data to a spreadsheet or a pipe delimited text file (that I will import into Excel).
I have all the possible CODES in the Global Table section of UFT and it will now loop through each CODE and land on the page that I need to collect data from. It currently takes a screenshot but I do not want to go though all 200+ screenshots and manually list each visible item.
I'd rather do it once and collect the data in Excel. Then I can get the developers to sign off on the DOM data I collected as our official Requirements because currently they do not have any requirements to give us. (for real!!).
I'll list below one of the online examples I tried and the error I got. If anyone can help me accomplish this I would appreciate it.
Code:
ChilObjs = Browser("my actual correct browser name was here").Page("my actual correct page name was here").Childobjects
tol=Chilobj.count
for i = 0 to UBound(tol)
a =chilObjs(i).Name
print a
Next
The error I get is "Wrong number of arguments or invalid property assignment: 'ChilObjs'"
And I was just trying to get the name here, not even trying to get whether the object was visible or enabled yet.
Thank you for your time,