Tushar Shah a écrit :
Hi All,
I have 2 links on 1 page which has the name very similar say: "Own".
How do i access one of the link in my code.
Please let me know.
Regards,
Tushar
find something discriminative (like a property) or use xpath.
In xpath you can use [1] or [2] after your expression if there is more
than one element that match.
say //a[contains(.,'o bladi o blada')] points to both links then
(//a[contains(.,'o bladi o blada')])[1] points to the first one.
for a short intro to xpath see
http://www.zvon.org/xxl/XPathTutorial/General/examples.html
Hope it helps
Alex
Ce message est protégé par les règles relatives au secret des correspondances.
Il est donc établi à destination exclusive de son destinataire. Celui-ci peut
donc contenir des informations confidentielles. La divulgation de ces
informations est à ce titre rigoureusement interdite. Si vous avez reçu ce
message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail
figure ci-dessus et de détruire le message ainsi que toute pièce jointe.
This message is protected by the secrecy of correspondence rules. Therefore,
this message is intended solely for the attention of the addressee. This
message may contain privileged or confidential information, as such the
disclosure of these informations is strictly forbidden. If, by mistake, you
have received this message, please return this message to the addressser whose
e-mail address is written above and destroy this message and all files attached.
_______________________________________________
Selenium-users mailing list
Selenium-users@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users