Select Page
Selenium

WebDriver Sending Keys Combination

The below snippet shows how to press 'Ctrl+G' keys combination in an object.

You can send sequence of characters and keyboard keys in ‘SendKeys’ method. And it is possible to give more sequence of keys and strings with ‘,’ delimited.

The below snippet shows how to press ‘Ctrl+G’ keys combination in an object.

Code

WebElement txtGoogle=firefox.findElement(By.name("q"));
txtGoogle.sendKeys(Keys.CONTROL,"G");  

Comments(0)

Submit a Comment

Your email address will not be published. Required fields are marked *

Talk to our Experts

Amazing clients who
trust us


poloatto
ABB
polaris
ooredo
stryker
mobility