Interview Questions

Selenium WebDriver - How to get typed text from a textbox ?Selenium ?

Selenium WebDriver Interview question and Answers


(Continued from previous question...)

Selenium WebDriver - How to get typed text from a textbox ?Selenium ?

use getAttribute(“value”) method by passing arg as value. String typedText = driver.findElement(By.xpath("xpath of box")).getAttribute("value")); 1

String typedText = driver.findElement(By.xpath("xpath of box")).getAttribute("value"));

(Continued on next question...)

Other Interview Questions