Timed out waiting for async script result Selenium C# Protractor

冷暖自知 提交于 2020-01-01 12:13:11

问题


I'm trying to create an automation test script using Protractor.net for an AngularJS platform, with Selenium in C#. I've created the driver using the below code.

driver = new FirefoxDriver();
Ngdriver = new NgWebDriver(driver);

And then attempted to locate and element as follows:

Ngdriver.FindElement(NgBy.Model("vm.reference")).SendKeys("Test");

However, I'm receiving an exception: Timed out waiting for async script result after 45ms.

Thanks in advance


回答1:


I resolved this by using the SetScriptTimeout.

ngDriver.Manage().Timeouts().SetScriptTimeout(TimeSpan.FromSeconds(10));


来源:https://stackoverflow.com/questions/33698085/timed-out-waiting-for-async-script-result-selenium-c-sharp-protractor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!