Our team develops automation solutions for various web based products.

I'd like to compile a list of patterns and best practices from the GUI web automation space that have been used and proven as successful.

The "Page Object" pattern is one pattern, though I couldn't find any books, articles or blog posts that describe it in detail.

What are other patterns that can be used in order to create automated test cases that act on the application's GUI and that are robust and stable?

  • You mean architectural patterns like PageObject or good automation practicies like this?
    – dzieciou
    Jan 13, 2013 at 17:35
  • Isn't the 'best practice' not to automate at the GUI which might explain why you find few patterns... Jan 14, 2013 at 12:40
  • @PhilKirkham Automating at the GUI level can have benefits, particularly in regression testing or acceptance testing. I wouldn't say to do no automated GUI testing. Jan 16, 2013 at 16:42
  • I asked a similar question some time ago sqa.stackexchange.com/questions/3254/…
    – oldbam
    Mar 11, 2013 at 15:22
  • I don't see any reference to Page Object in the link provided
    – ilm
    Feb 28, 2016 at 5:09

2 Answers 2


First of all I would recommend to read about the Testing Pyramid (if you do not know it yet); in a nutshell, do not create more than 10% GUI Tests.

Furthermore, I recommend these two articles from Gojko Adzic:Ui Testing without shooting yourself and Effective User Interface Testing

In our current project we (unfortunately) have a lot of GUI Tests. What helped us a lot to get those more stable and reduce fixing time, is to raise the level of abstraction. First, you have your page objects (one object is dedicated to one page/tab). After that, create workflows that represent a certain functionality and thereby can be reused in several tests, e.g. Login.

GUI tests tend to take more time to complete, so if something happens at the very beginning, it might be possible that it still fails after 10 minutes (timeout). Therefore we introduced checkpoints; those represent a certain state (e.g. in the database) and have to be reached after a defined time. E.g. one checkpoint polls the database for the field "order" and if that field is still empty after 2 minutes, the test fails. Thereby you save time by failing faster.


The page object pattern is a pretty simple concept, not nearly enough meat on it for an entire book, although I could definitely see a book about UI automation that included it. This blog post has some good information about it: http://selenium-tutorial.blogspot.com/2012/06/webdriver-page-objects-pattern.html

As for other best practices, see this answer and the linked presentation/examples: Good resources/tutorials/tips for beginner doing automation?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.