question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

browser.wait waits indefinitely after performing browser.restart

See original GitHub issue

Referencing https://github.com/angular/protractor/issues/3881

Hi there!

I am facing a similar issue, when using browser.restart. In my case, a subsequent browser.wait call waits almost indefinitely, and times out after an obscene amount of time, although the page is loaded and visible the whole time.

I perform the restart operation in the Before hook of Cucumber:

Before(function(scenario) { let currFeatureName=scenario.sourceLocation.uri; console.log('feature : ',currFeatureName); if(featureName===null) featureName=currFeatureName; else if(currFeatureName!==featureName) return browser.restart(); });

Followed by a Given, where I perform a browser.get, followed by a browser.wait, before interacting with my element:

Given(/^user is logged in SNAPP$/,function(){ console.log('started : '); browser.ignoreSynchronization = true; browser.driver.get(browser.params.logon.url); browser.wait(until.visibilityOf(element(by.id('logonDialogLbl'))),1000,'waiting to load url'); logonpage.logon(); browser.sleep(2000);

It is seemingly getting stuck in the browser.wait call, and times out, after waiting for an enormous amount of time.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:8

github_iconTop GitHub Comments

3reactions
philsnydercommented, Feb 1, 2018

Same here. It was working since the Chrome 64 update. Now when I perform a browser.get(‘someUrl’) and do a subsequent browser.wait it stalls. I now have to logout and log back in prior to each of my tests. This is cumbersome.

1reaction
scippercommented, Feb 16, 2018

same error like @gologox since Chrome 64.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Protractor browser.wait causes angular timeout - Stack Overflow
The wait() function always waits for a boolean value to be returned until the timeout value ... browser.wait(function() { return browser.
Read more >
Browser waiting for connection forever - windows - Super User
The browser gets stuck on "Waiting for {website}" and just waits for the connection forever or says "{website} took to long to answer"....
Read more >
Sometimes tabs take forever to open, 5 minutes and still waiting
Sometimes tabs take forever to open, 5 minutes and still waiting | Firefox Support Forum | Mozilla Support.
Read more >
336734 - page load hangs with "Waiting for cache..." message
The browser hangs. What is the expected behavior? I expect that not to happen. To actually load the webpage after clicking the link....
Read more >
Understanding Selenium Timeouts with Examples
This timeout is used to specify the amount of time the driver should wait while searching for an element if it is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found