-5
<ul class="abc">

<li style="width:65px;">


<a href="event.do"onclick="JavaScript";>create new</a>

</li>

<li style="width:70px;">


<a href="event.do"onclick="JavaScript";>home</a>

</li>

</ul>

can any one help me with sample selenium web driver sample code to access the create new/home link

1
  • 6
    Welcome to SO. Read through this Commented Dec 18, 2014 at 14:19

1 Answer 1

1

Your question is too broad. Please refer here for implementation. Here is the selector and find element mechanism you should be using to locate the element. Let me know if you still need help.

driver.findElement(By.xpath("//[.='create new']")).click();

This is text based xpath search. More examples here

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.