Pressing Ctrl+A in Selenium WebDriver

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

    This is what worked for me using C# (VS2015) with Selenium:

    new Actions(driver).SendKeys(Keys.Control+"A").Perform();
    

    You can add as many keys as wanted using (+) inbetween.

提交回复
热议问题