Timed out waiting for async script result Selenium

2019-04-09 18:12发布

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条回答
成全新的幸福
2楼-- · 2019-04-09 18:37

I resolved this by using the SetScriptTimeout.

ngDriver.Manage().Timeouts().SetScriptTimeout(TimeSpan.FromSeconds(10));
查看更多
登录 后发表回答