Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
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..

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...