Search code examples
javascriptwebdriverfunctional-testing

WebDriver capabilities?


I'm exploring possibilities for automating browser content tests. WebDriver is something I'm looking at; also, PhantomJS / CasperJS. It appears easy enough to test for the presence of text content, or of a particular element. However, what I need is rather more complex. For instance:

  • Need to be able to determine whether text in one element overlaps a bounded area on the screen.
  • Need to be able to test for visibility of an element--not merely that it's not set as "hidden" but also that it's not covered up by another element.
  • Need to be able to verify correct layout of elements; e.g., that an image is displayed to the right of a block of text, rather than below it.

What it comes down to is the ability to automate the inspection of a Web application to make sure it looks and behaves as it's supposed to. Are the tools I've mentioned the right sort for this, and will they do what I need?


Solution

  • WebDriver handles "covered up", but not the other criteria you're looking for. You might find Fighting Layout Bugs interesting, though, as it tries to deal with exactly those.