sendKeys() method in selenium
sendKeys() in selenium is also one of the most used method. It is being used to type texts in textbox web element on web page. Before using sendKeys() method, you must have to locate that textbox element using any of the different available element locator strategy like name, id, xpath etc.
- sendKeys() method is part of WebElement interface which extends SearchContext and TakesScreenshot interfaces.
- sendKeys() method is used to type text in input box.
- sendKeys() method will not clear existing text in textbox but it will append text.
- You can type password as well using sendKeys() method.
- Also you can select value from drop down using sendKeys() method.
