Class PageAct

java.lang.Object
jp.co.moneyforward.autotest.actions.web.PageAct
All Implemented Interfaces:
Act<com.microsoft.playwright.Page, com.microsoft.playwright.Page>

public abstract class PageAct extends Object implements Act<com.microsoft.playwright.Page, com.microsoft.playwright.Page>
A general-purpose act. Convenient starting point for writing insdog based tests.
  • Constructor Details

    • PageAct

      protected PageAct(String description)

      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. The description should be concise but informative enough for a reader to reproduce the same action that this Act 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 a PageAct 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 to perform(Page,ExecutionEnvironment) method.
      Specified by:
      perform in interface Act<com.microsoft.playwright.Page, com.microsoft.playwright.Page>
      Parameters:
      value - A page object on which this act 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 the act to be performed by this object.
      Parameters:
      page - A page object on which this act is performed.
      executionEnvironment - An execution environment, in which this act is performed.
    • name

      public String name()
      Returns a name of this object.
      Specified by:
      name in interface Act<com.microsoft.playwright.Page, com.microsoft.playwright.Page>
      Returns:
      A name of this object.