I'm writing some selenium tests and find myself doing stuff like this a
lot:

  @browser.click("//d...@id='four-col-bd']//div[contains(@class,
'column')]//a")

In this case i want to click on the first link in the first column in a
div that has a group of four columns in it.

I'm thinking it would be nicer to use jquery-style dom element selectors
for this sort of thing...can anyone think of a way i could lever it in
there?

BTW, in case anyone's wondering, i have been using the selenium ide to
generate test scripts but i find that the link locators tend to be too
data-specific: that is, the ide records that you clicked on a link by
saying "link=<link_html>", where link_html is the visible text in the
link.  This seems too fragile and data-dependent, that's why i'm trying
to generalise it a bit to use the page structure instead.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to