Questions tagged [page-objects]

Page Object is a design pattern used when creating browser automation.

Further reading on Page Objects available below: check here on wiki

Within your web app's UI there are areas that your tests interact with. A Page Object simply models these as objects within the test code. This reduces the amount of duplicated code and means that if the UI changes, the fix need only be applied in one place. Taking it back to basics, essentially there are three functions I see a page object pattern provides:

  • Ability to easily instantiate pages in a consistent manner;
  • Ability to concisely describe elements on a page, keep it DRY by avoiding repetition of element identifiers (using the underlying
    driver’s API); and
  • Ability to provide higher level methods that use the elements to perform user oriented functions.

POM reference link

182 questions
10
votes
1 answer

Does the Page Objects pattern scale?

This question asks if the Page Objects pattern for automated GUI testing works for bigger projects. But as the question was focused on a single testing tool/framework I think its a good idea for a bit more general question. We just started using the…
Niels van Reijmersdal
  • 32,520
  • 4
  • 57
  • 124
9
votes
6 answers

Page Object Model how much abstraction?

When developing a page object model, the whole intention is generally to abstract the page into methods that keeps code reusable and increase readability. Something I often get stuck on how high of a level do I abstract something? So for example…
Mercfh
  • 1,736
  • 2
  • 14
  • 27
1
vote
1 answer

Need info about WTWebUIAUTO package in .NET

I have recently gone through a Test Automation pattern i.e., BeyondPageObjectpattern in Selenium. While going through the code I came across a package WTWebUIAuto. Can anybody give me some info about this package ? I am not able to find any info…
Praveen
  • 13
  • 2
0
votes
1 answer

Page Object Model: Handling Large Forms

So i've ran into what is probably a common issue when designing a page object model based framework. For this specific example I am using Cypress (So JavaScript) but the problem exists for all PoM based setups. Currently the way I have designed the…
Mercfh
  • 1,736
  • 2
  • 14
  • 27
0
votes
4 answers

Selenium PageObject model returns multiple objects

Please find the below code and I'm trying to return 2 objects ( Page6 and Page7 ) but it's asking me to remove the second object. Please let me know how to return multiple objects using return type Object. Page7.java public class Page7 { …
Anu
  • 51
  • 3
  • 9