Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

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)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Software Engineer (Java)
  • Location
    Berlin, Germany
  • Work
    Testautomation Engineer at Telecolumbus
  • Joined

Trending onDEV CommunityHot

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp