• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Wonder-disc] ERSelenium without ERExtensions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Wonder-disc] ERSelenium without ERExtensions


  • Subject: Re: [Wonder-disc] ERSelenium without ERExtensions
  • From: Denis Frolov <email@hidden>
  • Date: Sat, 30 Jun 2007 15:27:29 +0400

On Jun 30, 2007, at 3:08 PM, Michael Bushkov wrote:

How do you handle "clicking" on component action links?

We try to use "link" locators and simple xpath where possible: |clickAndWait|link=Return Hat|| and |clickAndWait|//button[@value='Next']||

Here is also the ugly, but powerful example from the BugTracker's set of tests (I guess it's the only way there to emulate clicking on the 'Comment' link in the '__SeleniumBugSubject' bug's row):
|clickAndWait|//td[contains(text(), '__SeleniumBugSubject')]/ parent::*/preceding-sibling::tr[position() = 1]//a[text() = 'Comment']||

Here is a somewhat cleaner example of xpath which will locate a link in the cell of the row with '__SeleniumBugSubject' text in it (we assume here that there only one link in a row):


//tr[contains(string(), '__SeleniumBugSubject')]/td/a

Not that ugly, huh? Xpath is not as clean as id locator, but it is pretty powerful. I tend to think that it is a better choice for developer than applying ids to all the needed elements.

--
Denis
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: [Wonder-disc] ERSelenium without ERExtensions (From: Chuck Hill <email@hidden>)
 >Re: [Wonder-disc] ERSelenium without ERExtensions (From: Steven Mark McCraw <email@hidden>)
 >Re: [Wonder-disc] ERSelenium without ERExtensions (From: Chuck Hill <email@hidden>)
 >Re: [Wonder-disc] ERSelenium without ERExtensions (From: Michael Bushkov <email@hidden>)
 >Re: [Wonder-disc] ERSelenium without ERExtensions (From: Chuck Hill <email@hidden>)
 >Re: [Wonder-disc] ERSelenium without ERExtensions (From: Michael Bushkov <email@hidden>)

  • Prev by Date: Re: [Wonder-disc] ERSelenium without ERExtensions
  • Next by Date: Using objectMatchingKeyAndValue
  • Previous by thread: Re: [Wonder-disc] ERSelenium without ERExtensions
  • Next by thread: Support blog set up for tutorial
  • Index(es):
    • Date
    • Thread