This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Testing and the fly likes selenium code for ahref Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "selenium code for ahref" Watch "selenium code for ahref" New topic

selenium code for ahref

Niks shah

Joined: Aug 05, 2009
Posts: 5
hi all,
i am new to selenium.
please tell what will be selenium code for

<a href="javascript:showNewWindow('/market/')">

i tried for this "//a[contains(@href, 'javascript:showNewWindow('/market/')')]");
but its throwing error
Exception in thread "main" com.thoughtworks.selenium.SeleniumException: ERROR: Invalid xpath

what is mistake is there in my code?
please suggest me some proper solution.

John de Michele

Joined: Mar 09, 2009
Posts: 600
Try this:

If the link is like this:

then you could try this:

Consider Paul's rocket mass heater.
subject: selenium code for ahref
Similar Threads
Selenium - SystemRoot apparently not set
Testing Struts applications with Selenium
selenium testing using gwt
Accessing a session scoped variable anywhere outside the session scoped context
How to compile all the java classes which are inside one package?