我使用的是C#上的硒webdriver,我正在使用页面对象模块。现在我需要一个语法来明确地等待,因为我已经拥有了webelement。显式等待Selenium Webdriver用于手动元素
[FindsBy(How = How.Id, Using = "Passwd")]
public IWebElement Password {get;set;}
[FindsBy(How = How.Id, Using = "signIn")]
public IWebElement Signin { get; set; }
我需要等到找到元素密码。
使用本模块之前我用的是:
WebDriverWait wait = new WebDriverWait(driver.driver, TimeSpan.FromSeconds(Time));
wait.Until(ExpectedConditions.ElementExists(by));
现在我需要使用该元素在手。
在预期条件下不接受ElementToBeClickable。它给出.........'OpenQA.Selenium.Support.UI.ExpectedConditions'不包含'ElementToBeClickable –
的定义你可以看到这个链接的c#文档,https://seleniumhq.github.io/ selenium/docs/api/dotnet/html/M_OpenQA_Selenium_Support_UI_ExpectedConditions_ElementToBeClickable_1.htm它由'ExpectedConditions'支持。我很奇怪你为什么会得到错误 –
你使用什么版本的硒? –