DEV Community

Cover image for Selenium Page Factory
Anne Quinkenstein
Anne Quinkenstein

Posted on

Selenium Page Factory

how it works

FindBys - AND Condition

Eg: @FindBys({@FindBy(id = "foo"), @FindBy(className = "bar")})

HTML source code of a WebElement:

In POM:

@FindBys({
@FindBy(id = "searchId_1"),
@FindBy(name = "search_field")
})

WebElementSearchButton;

In the above example, the WebElement ‘SearchButton’ is located only if it matches both the criteria whose id value is “searchId_1” and the name value is “search_field”. Please note that the first criteria belong to a parent tag

and the second criteria for a child tag.

FindAll - OR Condition

@CacheLookUp

if a Webelement is approched several time, you can store it in cache

extended

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more