异步脚本超时

asynchronous script timeout

我不熟悉量角器和使用 Protractor-net。在 运行 Protractor-net 脚本时出现 "Asynchronous script timeout: result not received in 0 seconds" 异常。

https://github.com/bbaia/protractor-net

这是否意味着传递给识别 angular 元素的参数是错误的?

找到这个解决方案来解决这个问题 - https://github.com/angular/protractor/issues/117

如何在 Protractor-net 中实现相同的功能?

如果您不希望它是 0,则需要设置异步超时以增加超时,并在实例化 driver 的任何地方执行此操作。 由于 Angular 的异步行为的性质,它尤为重要。

[SetUp]
public void SetUp()
{
    //driver = new PhantomJSDriver();
    driver = new ChromeDriver();
    //SetScriptTimeout is the asysn script timeout
    driver.Manage().Timeouts().SetScriptTimeout(TimeSpan.FromSeconds(5));
}

this