Page Objects Flashcards
What a Page Object represents ?
An area in the web application interface with which your test is going to interact. A class, a module or a set of functions that contains the interface to a form, a page or a fragment of the page of the SUT which a test automator wants to control.
main reasons to use a Page Object:
- It creates reusable code that can be shared by multiple test scripts
- It reduces cost and maintenance efforts for test automation scripts
- It encapsulates all operations on the SUT’s GUI in one layer
- It gives a clear separation between the business and the technical parts for the test automation design
- it gives a single point to repair all relevant scripts
Another name for Page Object:
Page Object Pattern
What it is the function of the Test Abstraction Layer?
It takes care of interfacing between the logic of the test case and the physical needs of driving the SUT.
Which is one of the main uses of a Page Object?
Abstract (hide details) the GUI of the SUT.
Which is one of the achievements of the complexity hiding in automation through the use of page objects?
To making it easier for the scripters to quickly create valid and powerful scripts.
A Page Object exports business operations that
are used as test steps in Test Execution Layer.
What type of testing the Page Object Pattern does implement?
Page Object Pattern
What layers we should observe when we are dividing a TAA into layers and designing Page Objects?
- Page Objects should not contain business assertions nor verification points.
- All assertions and technical verifications regarding the GUI (e.g., checking if a page has finished loading) should be done only within Page Objects.
- All waits should be encapsulated in Page Objects.
- Only the Page Object should contain calls to Selenium functions.
- A Page Object does not need to cover the whole page or form. It may control a section or other specific part of it.
Which is the role of a Page Object in a Test Abstraction Layer ?
To encapsulate calls to Selenium WebDriver methods.
Which is the role of a Page Object in a Test Execution Layer ?
To deal only with the business tier.