| || |
How can I find and object in a Web Page
It is possible to create this escenario in Test Partner?? How?? [img]/images/graemlins/confused.gif[/img]
I have a list of report that i will named: Response View, each report has the ID linked in order to edit the report. Can I edit the report if:
1. The record could be in any page of a response view. Today the submission could be in page 1 but tomorrow in page
2. The record could also be in the same page as it was at the time of recording BUT in a different row during the actual test
Re: How can I find and object in a Web Page
So you need to find an HTML element that contains a number which can be variable that you use to identify each report?
You need to find something unique about the element that contains the number or something in an adjoining element that will not change so that you can find it's location. If this is in IE you can probably use the DOM and some attribute of the element to do this. If it's not IE or your trying to do this in a Visual test, you probably don't need to read any further.
You should start by simply identifying the object with TP to see if you see anything unique. If not, you should then look at the pages source to see if you can see any indication of uniqueness. Then, even if you don't see anything in the source, add a reference to the Microsoft HTML library and set the object to it's corresponding HTML type. Put a break point after your set statement and view the object that you set in the watch window look for a unique attribute or property. Once you find one, you should be all set.
If none of this makes any sense, maybe you could link and example page. I can't say that I can get back to this right away, but I'll try.