Niks shah

Greenhorn
+ Follow
since Aug 05, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Niks shah

Paul Clapham wrote:And a more readable one, too. It took me nearly 30 seconds to see the extra quote character which is almost at the end of the XPath expression.



I don't think there is any extra quotes in Xpath expression.
please check it out again.
I don't think there is any extra quotes in Xpath expression.
please check it out again.
My selenium code is:-

selenium.click("//a[contains(@href, \"javascript:openViewPromo('/store/viewAssociatedPromotion.do?offerId=13001862','width=400px,height=350px,left=200px,top=150px,resize=1,scrolling=1')\"]");



but i m getting this error:



Exception in thread "main" com.thoughtworks.selenium.SeleniumException: ERROR: Invalid xpath [3]: XPath parse error //a[contains(@href, "javascript:openViewPromo('/store/viewAssociatedPromotion.do?offerId=13001862','width=400px,height=350px,left=200px,top=150px,resize=1,scrolling=1')"]:
//
Step
[
[qname]
(
Expr
ArgumentRemainder
]
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
at com.unitedinternet.portal.selenium.utils.logging.LoggingCommandProcessor.doCommand(LoggingCommandProcessor.java:141)
at com.thoughtworks.selenium.DefaultSelenium.click(DefaultSelenium.java:167)
at com.automation.selenium.NonDefaultPromotion.Execute(NonDefaultPromotion.java:132)
at com.automation.selenium.NonDefaultPromotion.main(NonDefaultPromotion.java:268)
:banghead: :banghead:




what is the mistake in my code..?

please help me.





Thanks,

NIKS
I've got a table with a dynamic number of rows.

when i add a data in this table, a row is created dynamically which contains fields like name,type , some links.

I want to click a link (edit or delete) in the row that i created.


Please help me out..


Thanks
8 years ago
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
8 years ago