Header Ads

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.









No comments


What would you like to add in my list? I look forward to reading your comments below.



Powered by Blogger.