Package org.openqa.selenium.htmlunit
Class InputKeysContainer
java.lang.Object
org.openqa.selenium.htmlunit.InputKeysContainer
Converts a group of character sequences to a string to be sent by sendKeys.
- Author:
- Alexei Barantsev, Ahmed Ashour, Rob Winch
-
Constructor Summary
ConstructorsConstructorDescriptionInputKeysContainer(boolean trimPastEnterKey, CharSequence... sequences) Creates a newInputKeysContainercontaining the specified character sequences, with the option to trim content after the first ENTER or RETURN key.InputKeysContainer(CharSequence... sequences) Creates a newInputKeysContainercontaining the specified character sequences. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetCapitalization(boolean capitalize) Sets whether the input sequences should be capitalized.toString()booleanReturns whether a submit key (ENTER or RETURN) was found in the input sequences.
-
Constructor Details
-
InputKeysContainer
Creates a newInputKeysContainercontaining the specified character sequences.This constructor does not trim characters past an ENTER or RETURN key if present.
- Parameters:
sequences- one or more sequences of characters to include in the container
-
InputKeysContainer
Creates a newInputKeysContainercontaining the specified character sequences, with the option to trim content after the first ENTER or RETURN key.If
trimPastEnterKeyistrueand the character sequences contain an ENTER or RETURN key, the container will truncate the content at the first occurrence of that key.- Parameters:
trimPastEnterKey- iftrue, truncate content after the first ENTER/RETURN keysequences- one or more sequences of characters to include in the container
-
-
Method Details
-
toString
-
wasSubmitKeyFound
public boolean wasSubmitKeyFound()Returns whether a submit key (ENTER or RETURN) was found in the input sequences.- Returns:
trueif a submit key was found;falseotherwise
-
setCapitalization
public void setCapitalization(boolean capitalize) Sets whether the input sequences should be capitalized.- Parameters:
capitalize-trueto enable capitalization;falseto disable
-