【发布时间】:2020-09-04 18:20:02
【问题描述】:
我正在使用量角器进行 e2e 测试我的 Angular 应用程序。对于登录页面,我设置了 waitForAngularEnabled(false),然后将其设置为 waitForAngularEnabled(true)。但是我的测试因这个错误而失败:
Failed: script timeout
(Session info: chrome=85.0.4183.83)
(Driver info: chromedriver=85.0.4183.38 (9047dbc2c693f044042bbec5c91401c708c7c26a-refs/branch-heads/4183@{#779}),platform=Windows NT 10.0.18362 x86_64)
(Session info: chrome=85.0.4183.83)
(Driver info: chromedriver=85.0.4183.38 (9047dbc2c693f044042bbec5c91401c708c7c26a-refs/branch-heads/4183@{#779}),platform=Windows NT 10.0.18362 x86_64)
at Object.checkLegacyResponse (....node_modules\selenium-webdriver\lib\error.js:546:15)
at parseHttpResponse (....node_modules\selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (....node_modules\selenium-webdriver\lib\http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: Protractor.waitForAngular() - Locator: By(css selector, body)
当我搜索它时,我发现很多帖子建议我应该关闭同步或将 waitForAngularEnabled 设置为 false。但后来我失去了这个功能。
有人知道如何解决这个问题吗?
【问题讨论】:
-
设置回
true时能否添加代码
标签: angular protractor angular9