Try something like:
clickElementByXPath("//inp...@type='button' and contains(@onclick,'First
Last')]");
I highly suggest that you install Firefox's XPath Checker extension to help you
debug your XPath expressions.
Regards,
Julien
________________________________
De : "Singh-2, Rajinder" <[email protected]>
À : JWebUnit Development mail list <[email protected]>
Envoyé le : Lundi, 6 Juillet 2009, 12h24mn 47s
Objet : Re: [JWebUnit-development] Re : JwebUnit-Help needed
Thanks for the reply Julien.
I am trying this to click the button using the below written
function.
clickElementByXPath("//button[contains(.,\"First
Last\")]");
But it’s not working as expected
As First Last will
always be in second button so I tried finding the button which contains this
expression but its not working.
Regards
Rajinder
________________________________
From:Julien HENRY
[mailto:[email protected]]
Sent: Monday, July 06, 2009 3:36
PM
To: JWebUnit Development mail list
Subject: [JWebUnit-development] Re
: JwebUnit-Help needed
Hi,
You can certainly find an XPath expression that match only the one you want.
Then use clickElementByXPath
Regards,
Julien
________________________________
De :"Singh-2, Rajinder" <[email protected]>
À : [email protected]
Envoyé le : Lundi, 6 Juillet 2009,
11h44mn 56s
Objet : [JWebUnit-development] JwebUnit-Help needed
Hi,
I have two delete buttons with same value there is no name
attribute present.
Only difference between two is that there onclick function
is different.
<input type=button
value="Delete" onClick="javascript: void
areYouSure(2678707,'AliasFirst AliasLastBCEGIHBFEAIEJ')"; class=input>
<input type=button
value="Delete" onClick="javascript: void
areYouSure(2678706,'First LastBCEGIHBFBDCCE')"; class=input>
Is there any method by which I can click the second button?
Regards
Rajinder Singh
Senior Consultant
Seasia Consulting
Office: +91 172 6614600 Ext.: 72187
www.seasiaconsulting.com
Please cons id er the environment before printing this email.
This e-mail transmission and any
documents, files, or previous e-mail messages appended or attached to it, may
contain information that is conf id ential or privileged. If you are not the
intended recipient, or a person responsible for delivering it to the intended
recipient, you are hereby notified that any disclosure, copying, printing,
distribution, or use of the information contained or attached to this
transmission
is STRICTLY PROHIBITED. If you have received this transmission in error, please
immediately notify the sender by return this e-mail message and delete the
original transmission, its attachments, and any copies in your possession,
custody or control. Thank you.
------------------------------------------------------------------------------
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development