Selenium Webdriver C# Sendkeys (Keys.Arrowdown)

后端 未结 5 1919
傲寒
傲寒 2021-02-14 20:14

I\'m trying to do do an arrow using Selenium Webdriver/C# compile but when I try to compile I get this error:

\'Keys\' is an ambiguous reference between \

5条回答
  •  逝去的感伤
    2021-02-14 20:42

    Try this

    IWebDriver driver = new ChromeDriver();
    driver.Navigate().GoToUrl("http:www.google.com");
    IWebElement MyElement = driver.FindElement(By.Name("q"));
    MyElement.SendKeys(Keys.ArrowUp); MyElement.SendKeys(Keys.ArrowDown);

提交回复
热议问题