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>

public class ClickIfPresent extends ClickBase

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

    Nested classes/interfaces inherited from interface jp.co.moneyforward.autotest.framework.action.Act

    Act.Func<T,R>, Act.Let<T>, Act.Sink<T>, Act.Source<T>
  • Constructor Summary

    Constructors
    Constructor
    Description
    ClickIfPresent(Function<com.microsoft.playwright.Page, com.microsoft.playwright.Locator> locatorFunction)
    Creates an object of this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.microsoft.playwright.Page
    perform(com.microsoft.playwright.Page value, ExecutionEnvironment executionEnvironment)
    Applies this function the given argument: value(T) and returns the result (R).

    Methods inherited from class jp.co.moneyforward.autotest.actions.web.ClickBase

    name

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface jp.co.moneyforward.autotest.framework.action.Act

    andThen, describe
  • 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 on perform 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.