My journey begins on an Angular starting page. Clicking a button takes me to a login page that is non-angular. Once logged in, the rest of the pages are angular.
I am utilizing async/await.
- I attempted including
waitForAngularEnable
(true) in onPrepare but it did not work. - I also tried adding
waitForAngularEnable
(true) after login, but this was unsuccessful as well. - Increasing the
timeOut
did not resolve the issue either. - The only success I had was when using
waitForAngularEnable
(false). I could not rely on Protractor's built-in feature waitForAngular which waits for Angular to load. Currently, with waitForAngularEnable(false), I am manually managing it by using browser.driver.wait(until.elementsLocated(by.id(value)), 30000); or await browser.wait(ExpectedConditions.presenceOf(ele), 30000);. This approach works for me.
Versions-
"protractor": "^5.4.2"
"node" : 10.15.3
"target": "es6"
"cucumber": "^5.1.0",
"cucumber-html-reporter": "^5.0.0"
ScriptTimeoutError: script timeout: result was not received in 30 seconds
(Session info: chrome=74.0.3729.169)
(Driver info: chromedriver=74.0.3729.6
(255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Windows NT 10.0.17763 x86_64) at Object.checkLegacyResponse
(C:\Automation\General\node_modules\selenium-webdriver\lib\error.js:546:15) at parseHttpResponse (C:\Automation\General\node_modules\selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (C:\Automation\General\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(xpath, //span[@class='title__subtext'])