Posts: 7
Threads: 4
Joined: Jun 2009
Reputation:
0
10-01-2009, 09:27 PM
Hello,
I have web page where we display different books on the selected topic. Our sales department update this list once a month and post new book on the top. Now I have recorded script last month where I am clicking on first book on first row and then doing some comaprision.
My script FAILES because now First book on first row is changed. My Original book is now in the second row.
How can i idenfity the object once it is moved on the page?
Regards,
Bhavesh
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
10-02-2009, 12:31 PM
You can use descriptive programming to identify the books dynamically. search this forum for more help on DP.
Posts: 128
Threads: 9
Joined: Oct 2009
Reputation:
0
10-02-2009, 10:39 PM
I found the best way was to add the HTML ID property to the object in the repository. Obviously provided it has a tag. This allows you to always find the object anywhere on the page provided the id is unique. I sometimes had to add it manually by doing a "view source" on the page. This can be tricky if it's a .NET web page, but so far with a little effort, I've been pretty successful at making it work.
Posts: 7
Threads: 4
Joined: Jun 2009
Reputation:
0
10-02-2009, 10:42 PM
How to add HTML ID Property in the OR?
Posts: 128
Threads: 9
Joined: Oct 2009
Reputation:
0
10-02-2009, 11:22 PM
In the repository, select the object. On the right you should see the object properties area. In that area is a green +. click that and you will get a properties dialog popup. Depending on the class of object, you will see properties you can add. HTML ID should be one of them if it s a properly identified web object. There might be other tags you can use in there if ID isn't available. Be careful with X,Y as your control is moving around.
Posts: 7
Threads: 4
Joined: Jun 2009
Reputation:
0
10-02-2009, 11:31 PM
That is fine. so what can i do after finding the HTML Id? I have to use DP to find the ID and then click on that link so that If link (Object) is moved then I will ok?
Thanks,
Bhavesh