How can you write tests for Selenium (or similar) which don't fail because of minor or cosmetic changes?

Posted by Sam on Programmers See other posts from Programmers or by Sam
Published on 2010-11-14T10:07:46Z Indexed on 2011/02/20 23:32 UTC
Read the original article Hit count: 206

Filed under:
|

I've been spending the last week or so learning selenium and building a series of web tests for a website we're about to launch. it's been great to learn, and I've picked up some xpath and css location techniques.

the problem for me though, is seeing little changes break the tests - any change to a div, an id, or some autoid number that helps identify widgets breaks any number of tests - it just seems to be very brittle.

so have you written selenium (or other similar) tests, and how do you deal with the brittle nature of the tests (or how do you stop them being brittle), and what sort of tests do you use selenium for?

© Programmers or respective owner

Related posts about testing

Related posts about selenium