什么会导致点击操作在60秒后超时?即使元素清楚地显示在页面中并且是可点击的(我在点击之前有一个ExpectedConditions.ElementToBeClickable
检查),我得到抛出的异常。 OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://grid:4444/wd/hub/session/9e9693f0-0288-47a1-97f9-8f61c300bc41/element/29/click timed out after 60 seconds. ----> System.Net.WebException : The operation has timed out
什么会导致点击操作在60秒后超时?
WebDriverWait wait = new WebDriverWait(this.driverController.driver, TimeSpan.FromSeconds(30.00));
IWebElement clickThis;
wait.Until(ExpectedConditions.ElementToBeClickable(By.Id("elementId")));
clickThis = this.driverController.driver.FindElement(By.Id("elementId"));
clickThis.Click();
该异常发生在clickThis.Click()
谢谢,
嘿马特,你能告诉我们一些标记吗? – Rostech
@Matt如果您提供了正在测试的页面的HTML,我们可以就您的问题提供进一步的建议。 –
如果问题持续存在,请提供有关问题的更多信息,或者标记正确的答案。 –