Class PageAct
java.lang.Object
jp.co.moneyforward.autotest.actions.web.PageAct
- All Implemented Interfaces:
Act<com.microsoft.playwright.Page, com.microsoft.playwright.Page>
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
action
(com.microsoft.playwright.Page page, ExecutionEnvironment executionEnvironment) A method that defines theact
to be performed by this object.name()
Returns a name of this object.static PageAct
pageAct
(String description, BiConsumer<com.microsoft.playwright.Page, ExecutionEnvironment> action) Creates aPageAct
with a given description and an actioncom.microsoft.playwright.Page
perform
(com.microsoft.playwright.Page value, ExecutionEnvironment executionEnvironment) Performs an action defined for this class.
-
Constructor Details
-
PageAct
Creates a new instance of this class.
It is advised to give a concise and descriptive string to
description
parameter as it is printed the test report. Thedescription
should be concise but informative enough for a reader to reproduce the same action that thisAct
performs.- Parameters:
description
- A string that describes this object.
-
-
Method Details
-
pageAct
public static PageAct pageAct(String description, BiConsumer<com.microsoft.playwright.Page, ExecutionEnvironment> action) Creates aPageAct
with a given description and an action- Parameters:
description
- A string to describe created page act.action
- An action to be performed.- Returns:
- A page act that performs
action
.
-
perform
public com.microsoft.playwright.Page perform(com.microsoft.playwright.Page value, ExecutionEnvironment executionEnvironment) Performs an action defined for this class. Its execution is delegated toperform(Page,ExecutionEnvironment)
method.- Specified by:
perform
in interfaceAct<com.microsoft.playwright.Page, com.microsoft.playwright.Page>
- Parameters:
value
- A page object on which thisact
is performed.executionEnvironment
- An execution environment, in which this act is performed.- Returns:
- The
value
itself should be returned, usually.
-
action
protected abstract void action(com.microsoft.playwright.Page page, ExecutionEnvironment executionEnvironment) A method that defines theact
to be performed by this object.- Parameters:
page
- A page object on which thisact
is performed.executionEnvironment
- An execution environment, in which this act is performed.
-
name
-