Class SendKey
java.lang.Object
jp.co.moneyforward.autotest.actions.web.SendKey
- All Implemented Interfaces:
Act<com.microsoft.playwright.Page, com.microsoft.playwright.Page>
public class SendKey
extends Object
implements Act<com.microsoft.playwright.Page, com.microsoft.playwright.Page>
A class that represents an action to send key sequence to a specified locator.
If the key sequence starts with SendKey.MASK_PREFIX
, the part after it will be sent to an element specified by a locatorFunction
in a given page,
while the part before it (i.e., the MASK_PREFIX
itselft) will be printed in the log.
This feature is useful for secret strings to be sent to elements, but not to be printed such as passwords.
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of this class.SendKey
(Function<com.microsoft.playwright.Page, com.microsoft.playwright.Locator> locatorFunction, String keys) Creates an instance of this class.SendKey
(Function<com.microsoft.playwright.Page, com.microsoft.playwright.Locator> locatorFunction, Supplier<String> keySequenceGenerator) Creates an instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionname()
Returns a name of an instance of this interface.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
).
-
Field Details
-
MASK_PREFIX
-
-
Constructor Details
-
SendKey
-
SendKey
-
SendKey
public SendKey(Function<com.microsoft.playwright.Page, com.microsoft.playwright.Locator> locatorFunction, Supplier<String> keySequenceGenerator) Creates an instance of this class.- Parameters:
locatorFunction
- A function to choose a locator from a given page.keySequenceGenerator
- A supplier that generates a key sequence to be sent to a chosen locator.
-
-
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
). -
name
-