Package de.bmiag.tapir.htmlbasic.impl
Class DefaultSeleniumTextField
- java.lang.Object
-
- de.bmiag.tapir.selenium.element.AbstractSingleSeleniumElement
-
- de.bmiag.tapir.htmlbasic.impl.DefaultSeleniumTextField
-
- All Implemented Interfaces:
TextField
,SingleWebElementBased
,Displayable
,Enabable
,TapirElement
@Component("tapirTextField") @Scope("prototype") public class DefaultSeleniumTextField extends AbstractSingleSeleniumElement implements TextField
Default Selenium implementation of aTextField
.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Constructor Summary
Constructors Constructor Description DefaultSeleniumTextField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
deleteText()
Delete the element's textjava.lang.String
getText()
Returns the displayed text of the text field.boolean
isDisplayed()
Returns true, if the element is displayed.boolean
isEnabled()
Returns true, if the element is enabled.void
loseFocus()
Forces the text field to lose the focus (e.g.void
setText(java.lang.String text)
Sets the given text.-
Methods inherited from class de.bmiag.tapir.selenium.element.AbstractSingleSeleniumElement
getWebElement, setWebElement
-
-
-
-
Method Detail
-
getText
public java.lang.String getText()
Description copied from interface:TextField
Returns the displayed text of the text field. If it is a multiline text, the lines are separated with a line break character (\n).
-
setText
public void setText(java.lang.String text)
Description copied from interface:TextField
Sets the given text. The text field does not lose its focus after inserting a text. You have to callTextField.loseFocus()
explicitly.
-
loseFocus
public void loseFocus()
Description copied from interface:TextField
Forces the text field to lose the focus (e.g. triggering on change events).
-
deleteText
protected void deleteText()
Delete the element's text- Since:
- 2.0.0
-
isDisplayed
public boolean isDisplayed()
Description copied from interface:Displayable
Returns true, if the element is displayed. "Displayed" means it has to be part of the dom and it is not hidden using css.- Specified by:
isDisplayed
in interfaceDisplayable
- Returns:
- true, if the element is displayed.
-
-