From 15b916a838e800fb01326ede14f1a036dfed072f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?= Date: Sun, 26 May 2024 21:42:53 +0300 Subject: [PATCH] docs: update page object --- page-object/README.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/page-object/README.md b/page-object/README.md index 3be353b25..9e63dd8ee 100644 --- a/page-object/README.md +++ b/page-object/README.md @@ -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)