To achieve full test coverage for our new product sixbee, we chose to try out Selenium. It works perfectly fine for simple stuff like clicking on static links with static texts or IDs:

  1. selenium.clickAndWait("link=Click") // click on a element labeled "Click"
  2. selenium.clickAndWait("btn") // click on element with id "btn"

When it comes to testing components using Ajax, it’s getting trickier, as not all generated elements have an ID to reference it. Fortunately, Selenium offers some more possibilities for locating elements, such as XPath or CSS-selectors: >> more…