Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

browser.wait waits indefinitely after performing browser.restart #4680

@ash-lionell

Description

@ash-lionell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions