How can we type text in a textbox element using Selenium?

How can we type text in a textbox element using Selenium?

Hi Mark,

With the help of the sendKeys() method, we can type text in a textbox-

WebElement searchTextBox = driver.findElement(By.id("srch"));
searchTextBox.sendKeys("searchTerm");