I've got the following problem:
When recording a webtest using Selenium IDE (v1.0.4) every step will be recorded but when I try to replay the tests some buttons won't be found although they do not have dynamic identifiers.
For example you could use the following page to see what I mean:
http://www.vodafone360.com
There you may login (free registration) Recording of login and replay for this basic url works fine.BUT afterwards the page with the开发者_开发知识库 basic url home.vodafone.com opens.
On this page I am not able to automate the the click on any of the top navigation buttons (People, My Web, Shop)
I also used XPather Add-on to identify the whole XPath but this also was not successful (unless I was performing a click or right click on any of these links manually)
Also adding Selenium Steps like "click top-bar" to emulate a click on the top bar does not result in the expected behavior.
VerifyElementPresent for one of the top-bar buttons still returns "false"
Important note: Replay has to be performed after logout and fresh login so that no manual click on this page was performed for testing this.
Is there any special trick?
Thanks in advance!
To click the item People it looks like it will be easier to use a CSS selector to find the item. As you can see in the image below People is inside an li
tag. What you need to do is have your CSS selector find People and then click on the a
tag after it.
alt text http://img502.imageshack.us/img502/9776/vodafone.png
So in this case it would be css=li.people a
which is the equivalent to xpath=//li[@class='people']/a
so it its the child element of the li
So your command would be click | css=li.people a |
精彩评论