Interview Questions

Selenium WebDriver - How do you clear the contents of a textbox in selenium ?

Selenium WebDriver Interview question and Answers


(Continued from previous question...)

Selenium WebDriver - How do you clear the contents of a textbox in selenium ?

Use clear() method.
driver.findElement(By.xpath("xpath of box")).clear(); 1

driver.findElement(By.xpath("xpath of box")).clear();

(Continued on next question...)

Other Interview Questions