I want to select all content by pressing Ctrl+a from keyboard by using WebDriver with Java. I wrote the following code:
Actions actionObj = new Actions(driver);
actionObj.keyDown(Keys.CONTROL)
.sendKeys(Keys.chord("A"))
.keyUp(Keys.CONTROL)
.perform();
Unfortunately, it did not work. What's the wrong in my WebDriver Java code?