Pivotal Labs

Main menu

Skip to primary content
Skip to secondary content
  • About
  • Case Studies
  • Team
    • Executives
    • Locations
      • San Francisco (HQ)
      • Boston
      • Boulder
      • Denver
      • London
      • Los Angeles
      • New York
  • Community
    • Blogs
    • Tech Talks
    • Events
  • Careers
    • Lifestyle
    • Principles & Practices
    • Benefits
    • FAQ
    • Apply
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker

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

Whitney Schaefer
Thursday, August 23, 2012

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
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Add New Comment Cancel reply

Your email address will not be published.

Whitney Schaefer

Whitney Schaefer
San Francisco

Recent Posts

  • [Standup][SF] 08/24/12
  • Standup SF 8/22/12 – Database Backup Fun
  • [Standup][SF] 08/20/12
Subscribe to Whitney's Feed

Author Topics

agile (4)
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Contact
  • Labs
  • Events

Contact Us

contact@pivotallabs.com
+1 415-77-PIVOT
TwitterLinkedInFacebook

Pivotal Tracker

Tracker is the award-winning agile project management tool that enables real-time collaboration around a shared, prioritized backlog.
Visit pivotaltracker.com >