Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.7k points)

I need to press Ctrl+A keys using Selenium WebDriver. Is there any way to do it? I checked the Selenium libraries and found that Selenium allows keypress of special and functional keys only.

1 Answer

0 votes
by (62.9k points)

You can use the below code:

String select = Keys.chord(Keys.CONTROL, "a");

driver.findElement(By.id/class/or any other attribute("anything")).sendKeys(select);

Hope this helps!

Clearing the Selenium online certification exam will make you an expert in it's concepts and you can further get good job opportunities..

Browse Categories

...