Selenium Webdriver C# Sendkeys (Keys.Arrowdown)

后端 未结 5 1920
傲寒
傲寒 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 21:02

    I would suggest to do next:

        IWebElement element = driver.FindElement(By.Id("ctl00_PlaceHolderMain_ctrlChangeBillingAddress_ctrlChangeBillingAddress_txtBillingAddress"));
        OpenQA.Selenium.Interactions.Actions action = new OpenQA.Selenium.Interactions.Actions(driver);
        action.SendKeys(element, Keys.Down).SendKeys(element, Keys.Enter).Build().Perform();
    

提交回复
热议问题