Reputation: 183
I am trying to find an element that RF can locate. I tried Click Element, Click Link, and Mouse Down with now luck.
<a class="navHREF " href="#" onclick="return swap_interior_nav('6');">
<span class="glyphicon glyphicon-circle-arrow-down" id="span_1_6"></span>
Inventory
</a>
I have tried the below XPath and can’t seem to make it work
//a[contains(.,'Inventory')]
I can make it work with below, however, this link dynamic based on user permissions so the order can change of this function.
html/body/div[4]/div[2]/div[2]/ul/li[6]/a
Upvotes: 2
Views: 1519
Reputation: 6961
Your solution was close and perhaps inspired from this SO Question. The main issue you have is that your trying to access the first text node, whereas you need the second one. The below example works on the provided code.
//a[text()[contains(.,'Inventory')]]
Upvotes: 1