Hi Jonathan, A12345678 is know value, but the value 3140010 is dynamically generated. I want to click on the 3140010 hyperlink, and not to click the hyper A12345678. Each navigates to a different page.
Any ideas? Regards, Srini On Thu, Sep 2, 2010 at 5:31 PM, Jonathan Rosenberg <[email protected]>wrote: > If you truly want the first link on the page with text A0823274 you can > use this expression > > > > //a[text()=’A0823274’] > > > > -- > Jonathan Rosenberg > Founder & Executive Director, Tabby's Place > http://www.tabbysplace.org/ > > > > > > > > *From:* sriharini sriharini [mailto:[email protected]] > *Sent:* Thursday, September 02, 2010 5:22 PM > *To:* Jonathan Rosenberg > *Cc:* [email protected] > *Subject:* Re: [Webtest] figuring out the xpath > > > > i think i got the xpath > > > > xpath="(//td[3]//a|//td[4]//a...@href][string()='A0823274'])[1]" > > > > it click the first <a> associated with the string A0823274. > > > > Please let me know if there is a shorter or easier version. > > > > Regards, > > Srini > > On Thu, Sep 2, 2010 at 5:04 PM, sriharini sriharini <[email protected]> > wrote: > > Hi Jonathan, > > A12345678 is a fixed string, i want click on the number associated with > that string, in this case it is 3140010. > > I want to select the first <a> with has the A12345678. > > > > Regards, > Srini > > > > On Thu, Sep 2, 2010 at 4:58 PM, Jonathan Rosenberg <[email protected]> > wrote: > > Srini, > > > > I’m not sure what you’re looking for here. Are ‘3140010’ & ‘A12345678’ > fixed strings? Or are you trying to select the first <a> that has specific > text? Something else? > > > > -- > Jonathan Rosenberg > Founder & Executive Director, Tabby's Place > http://www.tabbysplace.org/ > > > > > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *sriharini sriharini > *Sent:* Thursday, September 02, 2010 4:19 PM > *To:* [email protected] > *Subject:* [Webtest] figuring out the xpath > > > > Hi All, > > Can you please help me in getting the xpath. > > i want to click the link 3140010 if it is A12345678. > > > > below is the html code for 1 row. > > ------------------------------------------------------------------ > > <tr> > > <td> > > 09/02/2010 > > </td> > > <td> > > Transaction > > </td> > > <td> > > <a > href="/test/back/process.do?processId=3140010&AccountId=1234">3140010</a> > > </td> > > <td> > > > > <a > href="/test/front/overview.do?CI=true&AccountId=1234">A12345678</a> > > </td> > > <td> > > The Test Account > > </td> > > <td> > > Draft > > </td> > > </tr> > > > > > > > > Thanks for the help. > > > > Regards, > > Srini > > > > > > >

