The type or namespace SelectElement could not be found in selenium c#

后端 未结 5 566
没有蜡笔的小新
没有蜡笔的小新 2020-12-07 01:19
driver.FindElement(By.Id(\"inputUsername\")).SendKeys(\"aca\");
driver.FindElement(By.Id(\"inputPassword\")).SendKeys(\"123\");
driver.FindElement(By.TagName(\"butto         


        
5条回答
  •  自闭症患者
    2020-12-07 02:09

    You need to make sure to reference the NuGet Package Selenium.Support.

    I was having the same issue and then realized that I was only referencing the Selenium.WebDriver NuGet Package. After adding the Selenium.Support NuGet package, and adding the proper using statements. My SelectElement code successfully compiled.

    The proper using statements

    using OpenQA.Selenium;
    using OpenQA.Selenium.Support.UI;
    

提交回复
热议问题