Class ClickIfPresent
java.lang.Object
jp.co.moneyforward.autotest.actions.web.ClickBase
jp.co.moneyforward.autotest.actions.web.ClickIfPresent
- All Implemented Interfaces:
Act<com.microsoft.playwright.Page, com.microsoft.playwright.Page>
A class that represents an act, where:
- Click a specified element exists in a page if it exists.
- Otherwise, does nothing.
Check for presence is done by Locator#isVisible
.
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionClickIfPresent
(Function<com.microsoft.playwright.Page, com.microsoft.playwright.Locator> locatorFunction) Creates an object of this class. -
Method Summary
Modifier and TypeMethodDescriptioncom.microsoft.playwright.Page
perform
(com.microsoft.playwright.Page value, ExecutionEnvironment executionEnvironment) Applies this function the given argument:value
(T
) and returns the result (R
).
-
Constructor Details
-
ClickIfPresent
public ClickIfPresent(Function<com.microsoft.playwright.Page, com.microsoft.playwright.Locator> locatorFunction) Creates an object of this class.- Parameters:
locatorFunction
- A function to locate an element to be clicked by this object onperform
method's call.
-
-
Method Details
-
perform
public com.microsoft.playwright.Page perform(com.microsoft.playwright.Page value, ExecutionEnvironment executionEnvironment) Description copied from interface:Act
Applies this function the given argument:value
(T
) and returns the result (R
).- Parameters:
value
- An argument value.executionEnvironment
- An environment in which this function is executed.- Returns:
- the function result.
-