Categories

1 Answer

Aug 22, 2019
By using clear() method

WebDriver driver = new FirefoxDriver();

driver.get("https://www.gmail.com");

driver.findElement(By.xpath("xpath_of_element1")).sendKeys("Software Testing Material Website");

driver.findElement(By.xpath("xpath_of_element1")).clear();

1

2

3

4

WebDriver driver = new FirefoxDriver();

driver.get("https://www.gmail.com");

driver.findElement(By.xpath("xpath_of_element1")).sendKeys("Software Testing Material Website");

driver.findElement(By.xpath("xpath_of_element1")).clear();
Click here to read more about Selenium
Click here to read more about Insurance

Related questions

Madanswer
Aug 22, 2019 in Selenium
Aug 22, 2019 in Selenium
Aug 22, 2019 in Selenium
...