Pressing Ctrl+A in Selenium WebDriver

前端 未结 13 1033
一向
一向 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:22

    Actions act = new Actions(driver);
    act.keyDown(Keys.CONTROL).sendKeys("a").keyUp(Keys.CONTROL).build().perform();
    

提交回复
热议问题