Monday, 20 June 2016

How to press control and shift keys in Selenium

We can use below code to press control, delete and shift keys in Selenium.

 driver.findElement(By.id("abc")).sendKeys(Keys.CONTROL + "a"); 
 driver.findElement(By.id("abc")).sendKeys(Keys.DELETE);   
 String keys = Keys.chord(Keys.ALT, Keys.SHIFT,"p"); 
 driver.findElement(By.id("abc")).sendKeys(keys);
 driver.findElement(By.name("name")).sendKeys(Keys.TAB);


What do you think on above selenium topic. Please provide your inputs and comments. You can write to me at reply2sagar@gmail.com

No comments:

Post a Comment

Buy Best Selenium Books