aspose file tools*
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
JavaRanch » Java Forums » Engineering » Testing
Bookmark "selenium code for ahref" Watch "selenium code for ahref" New topic
Author

selenium code for ahref

Niks shah
Greenhorn

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/preview.do?invid=118604&companyName=work.com')">

i tried for this
selenium.click( "//a[contains(@href, 'javascript:showNewWindow('/market/preview.do?invid=118604&companyName=work.com')')]");
but its throwing error
Exception in thread "main" com.thoughtworks.selenium.SeleniumException: ERROR: Invalid xpath

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


NIKS
John de Michele
Rancher

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

If the link is like this:

then you could try this:


John.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: selenium code for ahref