6

Currently I'm using page object design pattern with testing.

  • Is it out of curiosity you ask this question or you need to know this for a specific reason? Knowing the reason we may help better. – dzieciou Dec 23 '16 at 11:28
  • 2
    It came up in a job interview. Maybe it was a trick question. – RogerUK Dec 23 '16 at 11:41
  • 2
    Framework is concrete code - always an implementation. Design pattern can be implemented in multiple ways. Can be used within a framework or outside it. – Peter M. Dec 27 '16 at 14:52
7

Page object is an design pattern.

First you should understand the difference between framework and design pattern.
For that refer this link.

To understand page object design pattern refer this link.

Use Unofficial site for more detail : Do a Google search, you will get a lot info on this link.
Page Object Pattern

4

According to Selenium official documentation:

Page Object is a Design Pattern which has become popular in test automation for enhancing test maintenance and reducing code duplication.

It is not a framework as frameworks are usually understood as a specific implementation:

A software framework is a universal, reusable software environment that provides particular functionality as part of a larger software platform to facilitate development of software applications, products and solutions. Software frameworks may include support programs, compilers, code libraries, tool sets, and application programming interfaces (APIs) that bring together all the different components to enable development of a project or system

  • Thank you. I'll read up the documentaiton from Selenium. Thanks for the link. – RogerUK Dec 23 '16 at 11:42
1

It is a way to represent a webpage in an abstract way.

We "view" a webpage as if it was made of various objects, such as its page title, page URL, page elements (buttons and etc) and various actions we can perform on elements, such as click, drag, navigate and etc.

You can find more comprehensive information on Page Object here: Page Object Model link

  • So it is neither framework nor design pattern? – dzieciou Dec 23 '16 at 11:36
  • Thank you. As I mentioned above, just for clarification. The question came up in a job interview. – RogerUK Dec 23 '16 at 11:41
  • 1
    @dzieciou, thank you for pointing it out, my answer is a bit half baked. – Yu Zhang Dec 23 '16 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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