WebDriver Sending Keys Combination - Codoid
Select Page
Codoid Blog

WebDriver Sending Keys Combination

Irrespective of the business that your client is in, marketing is an integral part of their operations. In fact, in this day and age of social.

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");  

Written By

Submit a Comment

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


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");