WHAT IS CLEAR METHOD?

clear() method is basically used to clear all content from editable field.




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.









Post a Comment

0 Comments