Re: [Selenium-users] 2 same links on one page.
Hi Tushar My workarounds is the same as Alexandre's.If it didn't work,I think you must workin IE not FF. XPath doesn't work well in IE. James - Original Message - From: Tushar Shah To: selenium-users@lists.public.thoughtworks.org Sent: Saturday, December 24, 2005 4$10 AM Subject: Re: [Selenium-users] 2 same links on one page. I didn't understand this. Also, i don;t see any examples related to this in the selenium reference.Could you please provide me with the syntax and example? That wud be of great help.Regards,TusharJamesWang [EMAIL PROTECTED] wrote: Hi Tushar Please try //linkLocator[1] or //linkLocator[2].If you test in IE,those xpath _expression_ maybe not work. - Original Message - From: Tushar Shah To: selenium-users@lists.public.thoughtworks.org Sent: Thursday, December 22, 2005 6$57 AM Subject: [Selenium-users] 2 same links on one page. 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 __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___Selenium-users mailing listSelenium-users@lists.public.thoughtworks.orghttp://lists.public.thoughtworks.org/mailman/listinfo/selenium-users ___Selenium-users mailing listSelenium-users@lists.public.thoughtworks.orghttp://lists.public.thoughtworks.org/mailman/listinfo/selenium-users Yahoo! DSL Something to write home about. Just $16.99/mo. or less ___Selenium-users mailing listSelenium-users@lists.public.thoughtworks.orghttp://lists.public.thoughtworks.org/mailman/listinfo/selenium-users ___ Selenium-users mailing list Selenium-users@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users
Re: [Selenium-users] 2 same links on one page.
I didn't understand this. Also, i don;t see any examples related to this in the selenium reference.Could you please provide me with the syntax and example? That wud be of great help.Regards, TusharJamesWang [EMAIL PROTECTED] wrote: Hi Tushar Please try //linkLocator[1] or //linkLocator[2].If you test in IE,those xpath _expression_ maybe not work. - Original Message - From: Tushar Shah To: selenium-users@lists.public.thoughtworks.org Sent: Thursday, December 22, 2005 6$57 AMSubject: [Selenium-users] 2 same links on one page.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__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___Selenium-users mailing listSelenium-users@lists.public.thoughtworks.orghttp://lists.public.thoughtworks.org/mailman/listinfo/selenium-users___Selenium-users mailing listSelenium-users@lists.public.thoughtworks.orghttp://lists.public.thoughtworks.org/mailman/listinfo/selenium-users Yahoo! DSL Something to write home about. Just $16.99/mo. or less___ Selenium-users mailing list Selenium-users@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users
Re: [Selenium-users] 2 same links on one page.
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
Re: [Selenium-users] 2 same links on one page.
I still did not get it: (//a[contains(.,'o bladi o blada')])[1]I am confused to how can i use in my application. Can you please explain a little bit more.Regards, TusharAlexandre Garel [EMAIL PROTECTED] wrote: 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, Tusharfind 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.htmlHope it helpsAlexCe 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 t he addressser whose e-mail address is written above and destroy this message and all files attached.___Selenium-users mailing listSelenium-users@lists.public.thoughtworks.orghttp://lists.public.thoughtworks.org/mailman/listinfo/selenium-users Yahoo! Shopping Find Great Deals on Holiday Gifts at Yahoo! Shopping ___ Selenium-users mailing list Selenium-users@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users