Package org.openqa.selenium.htmlunit
Class InputKeysContainer
- java.lang.Object
-
- org.openqa.selenium.htmlunit.InputKeysContainer
-
public class InputKeysContainer extends Object
Converts a group of character sequences to a string to be sent by sendKeys.- Author:
- Alexei Barantsev, Ahmed Ashour, Rob Winch
-
-
Constructor Summary
Constructors Constructor Description InputKeysContainer(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetCapitalization(boolean capitalize)Sets whether the input sequences should be capitalized.StringtoString()booleanwasSubmitKeyFound()Returns whether a submit key (ENTER or RETURN) was found in the input sequences.
-
-
-
Constructor Detail
-
InputKeysContainer
public InputKeysContainer(CharSequence... sequences)
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
public InputKeysContainer(boolean trimPastEnterKey, CharSequence... sequences)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 Detail
-
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
-
-