Interview Questions

Selenium WebDriver - How to type in a textbox using Selenium?

Selenium WebDriver Interview question and Answers


(Continued from previous question...)

Selenium WebDriver - How to type in a textbox using Selenium?

User can use sendKeys(“String to be entered”) to enter the string in the textbox.
Syntax:
WebElement username = drv.findElement(By.id(“Email”));
// entering username
username.sendKeys(“sth”);

(Continued on next question...)

Other Interview Questions