Class TextField

java.lang.Object
com.onenetwork.platform.tools.test.ui.components.Component
com.onenetwork.platform.tools.test.ui.components.TextField
Direct Known Subclasses:
AutocompleteField, DateTimeField, StringEnumerationField

public class TextField
extends Component
Represents an instance of Ext.form.TextField.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected org.openqa.selenium.WebElement inputEl  

    Fields inherited from class com.onenetwork.platform.tools.test.ui.components.Component

    context, driver, element
  • Constructor Summary

    Constructors 
    Constructor Description
    TextField​(UIContext context, org.openqa.selenium.WebElement formItemEl)  
  • Method Summary

    Modifier and Type Method Description
    protected void callSetValue​(java.lang.Object value)  
    void clear()
    This will clear the value if input inputEl
    protected java.lang.String getId()  
    org.openqa.selenium.WebElement getInputEl()  
    java.lang.String getValue()  
    boolean isUsingNativeClick()  
    void setUseNativeClick​(boolean useNative)
    This will set the method of obtaining focus in setValue.
    void setValue​(java.lang.String val)
    Sets the value in the input Element with the supplied parameter value.
    protected void typeValue​(java.lang.String val)  

    Methods inherited from class com.onenetwork.platform.tools.test.ui.components.Component

    getEl, isDisplayed, isRequired

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • inputEl

      protected org.openqa.selenium.WebElement inputEl
  • Constructor Details

    • TextField

      public TextField​(UIContext context, org.openqa.selenium.WebElement formItemEl)
  • Method Details

    • setValue

      public void setValue​(java.lang.String val)
      Sets the value in the input Element with the supplied parameter value.
      Parameters:
      val -
      Throws:
      java.lang.RuntimeException - if the ext input component is readonly(disabled)
    • typeValue

      protected void typeValue​(java.lang.String val)
    • getValue

      public java.lang.String getValue()
    • getInputEl

      public org.openqa.selenium.WebElement getInputEl()
    • getId

      protected java.lang.String getId()
      Overrides:
      getId in class Component
    • clear

      public void clear()
      This will clear the value if input inputEl
    • callSetValue

      protected void callSetValue​(java.lang.Object value)
    • isUsingNativeClick

      public boolean isUsingNativeClick()
    • setUseNativeClick

      public void setUseNativeClick​(boolean useNative)
      This will set the method of obtaining focus in setValue.
      If set to true, focus will be grabbed with selenium: inputEl.click();
      If set to false, focus will be grabbed with javascript: context.clickByJavascriptExecutor(inputEl)
      The default value is false.