Interacting with Textboxes and Textareas Elements

The following are some of the methods provided by the WebElement class to interact with textboxes and textareas elements during the execution of a script:

  • boolean isEnabled(): Indicates if an element is enabled or not.
  • java.lang.String getAttribute(java.lang.String name): Gets the current value of a given attribute of an element. This is very useful for getting the contents of text areas, text boxes, and input elements.
  • java.lang.String getText(): Returns the visible inner text of an element. If the element has subelements, it will return a string with no spaces.
  • void sendKeys(java.lang.CharSequence… keysToSend): Simulates typing into an element.
  • boolean isDisplayed(): Indicates if an element is visible or not.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.151.252