docs: update page object

This commit is contained in:
Ilkka Seppälä
2024-05-26 21:42:53 +03:00
parent eb6da7397d
commit 15b916a838
+2 -10
View File
@@ -44,10 +44,6 @@ The Page Object design pattern is a popular design pattern in test automation. I
Let's consider a simple programmatic example of the Page Object pattern for a login page using Selenium in Java:
```java
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
public class LoginPage {
private final WebDriver driver;
@@ -85,10 +81,6 @@ In this example, the `LoginPage` class represents the login page of a web applic
This Page Object can be used in test scripts to interact with the login page without exposing the details of the page structure in the test code, promoting maintainability and reusability.
## Class diagram
![Page Object](./etc/page-object.png "Page Object")
## Applicability
Use the Page Object pattern when
@@ -129,5 +121,5 @@ Trade-offs:
* [Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation](https://amzn.to/4bjhTSK)
* [Selenium Design Patterns and Best Practices](https://amzn.to/4aofYv8)
* [Selenium Testing Tools Cookbook](https://amzn.to/3K1QxEN)
* [Page Object - Martin Fowler](http://martinfowler.com/bliki/PageObject.html)
* [Page Objects - Selenium](https://github.com/SeleniumHQ/selenium/wiki/PageObjects)
* [Page Object (Martin Fowler)](http://martinfowler.com/bliki/PageObject.html)
* [Page Objects (Selenium)](https://github.com/SeleniumHQ/selenium/wiki/PageObjects)