Trying to create XPath from this HTML snippet

Posted by doneright on Stack Overflow See other posts from Stack Overflow or by doneright
Published on 2010-04-07T22:05:02Z Indexed on 2010/04/08 12:53 UTC
Read the original article Hit count: 265

Filed under:
|

I have played for a while writing XPath but am unable to come up with exactly what I want.

I'm trying to write XPath for link(click1 and click2 in code snippet below) based on known text(myidentity in code snippet below). Can someone take a look into and suggest possible solution?

HTML code snippet:

<div class="abc">
  <a onclick="mycontroller.goto('xx','yy'); return false;" href="#">
    <img src="images/controls/inheritance.gif"/>
  </a>
  myidentity
  <span>
    <a onclick="mycontroller.goto('xx','yy'); return false;" href="#">click1</a>
    <a onclick="mycontroller.goto('xx','yy'); return false;" href="#">click2</a>
  </span>
</div>

© Stack Overflow or respective owner

Related posts about selenium

Related posts about xpath