All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jp.co.moneyforward.autotest.actions.web.ClickBase Maven / Gradle / Ivy

The newest version!
package jp.co.moneyforward.autotest.actions.web;

import com.microsoft.playwright.Locator;
import com.microsoft.playwright.Page;
import jp.co.moneyforward.autotest.framework.action.Act;
import jp.co.moneyforward.autotest.framework.internal.InternalUtils;

import java.util.function.Function;

///
/// An abstract base class for clicking acts.
///
public abstract class ClickBase implements Act {
  final Function locatorFunction;
  
  ///
  /// Creates an object of this class.
  ///
  /// @param locatorFunction A function to locate an element to click.
  ///
  protected ClickBase(Function locatorFunction) {
    this.locatorFunction = locatorFunction;
  }
  
  ///
  /// Returns a name of this object.
  /// The returned name is printed in action trees.
  ///
  /// @return A name of this object.
  ///
  @Override
  public String name() {
    return InternalUtils.simpleClassNameOf(this.getClass()) + "[" + this.locatorFunction + "]";
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy