[Logo]
Forums Register Login
selenium code for ahref
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
Try this:

If the link is like this:

then you could try this:


John.
Tell me how it all turns out. Here is a tiny ad:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter
https://coderanch.com/t/690611/ScroogeXHTML-RTF-HTML-XHTML-converter


This thread has been viewed 3032 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 19, 2018 03:22:13.