clear() method is basically used to clear all content from editable field.
Sample code for clear is:
When we use above code on Google Search homepage it would clear the all content from search box.
Sample code for clear is:
driver.findElement(By.name("q")).clear(); //where driver is the already defined WebDriver instance
When we use above code on Google Search homepage it would clear the all content from search box.
0 Comments
What would you like to add in my list? I look forward to reading your comments below.