January 2018
Beginner to intermediate
354 pages
7h 59m
English
The first Selenium page object class was created containing two getter and two setter methods. These methods, although not entirely object-oriented, are required to provide a way for the Selenium test classes to access a component inside the page object instance. This is a basic concept in Java called encapsulation. The data variables and objects in the class are hidden by making them private or protected, and only accessible outside the class using the getter methods, and so on.
As a general rule, we want to keep a separation between the page object and test classes. So, what happens if the user needs to access a button on the page to cancel some ...
Read now
Unlock full access