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 voidaction(com.microsoft.playwright.Page page, ExecutionEnvironment executionEnvironment) A method that defines theactto be performed by this object.name()Returns a name of this object.static PageActpageAct(String description, BiConsumer<com.microsoft.playwright.Page, ExecutionEnvironment> action) Creates aPageActwith a given description and an actioncom.microsoft.playwright.Pageperform(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
descriptionparameter as it is printed the test report. Thedescriptionshould be concise but informative enough for a reader to reproduce the same action that thisActperforms.- 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 aPageActwith 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:
performin interfaceAct<com.microsoft.playwright.Page, com.microsoft.playwright.Page>- Parameters:
value- A page object on which thisactis performed.executionEnvironment- An execution environment, in which this act is performed.- Returns:
- The
valueitself should be returned, usually.
-
action
protected abstract void action(com.microsoft.playwright.Page page, ExecutionEnvironment executionEnvironment) A method that defines theactto be performed by this object.- Parameters:
page- A page object on which thisactis performed.executionEnvironment- An execution environment, in which this act is performed.
-
name
-