Pressing Ctrl+A in Selenium WebDriver

前端 未结 13 959
一向
一向 2020-11-27 02:45

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 allow

13条回答
  •  执念已碎
    2020-11-27 03:27

    You could try this:

    driver.findElement(By.xpath(id("anything")).sendKeys(Keys.CONTROL + "a");
    

提交回复
热议问题