Change the name of the xpath

Hi Omar,

I would suggest you start with xpaths that are more readable and more robust

Assuming this link is for your login element:

This may fail even when the login button is still on the page, all it would take is for a developer to add another element somewhere else in the page to break this kind of extremely fragile xpath

An xpath like this would likely be more reliable and also make it clear what you are testing for without changing RF:
xpath://menu//form//li/a[text()='login']

And it may not even need to be that complicated, as a very simple xpath like this may be all you need if you don’t need to confirm that it is in a specific place and simply want to make sure that there is a link called logon somewhere on the page:
xpath://a[text()='login']

Learning how to write good xpaths will save you a lot of effort and make your test cases much more reliable, this is a good place to start XPath Syntax

Dave.

2 Likes