Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

PIVOTAL LABS
[Standup][SF] 08/23/12: Resqued!

Helps

  • Alternatives to css :contains() selector

We use this selector in many tests, for example the ones that require to click on the link of a specific table row:

within "tr:contains('My Line')" do
    click_link "Edit"
end

This selector however is deprecated, and didn’t make it to css3.

Thus, is it safe to use it in tests?

Suggestions

  • Iterate over all the links
  • Put an id on the link
  • Probably not going away (and contains back in if it breaks)
  • Data attribute
  • Xpath – last resort

Comments
Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *