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

restartBrowserBetweenTests feature is not working in protractor 4.0.10 #3684

Closed
mmraghavendra opened this issue Oct 29, 2016 · 2 comments
Closed

Comments

@mmraghavendra
Copy link

mmraghavendra commented Oct 29, 2016

I have tests as below. Test1 succeeds but Test2 which is same as Test1 always fails with below error (windows.angular is undefined) when restartBrowserBetweenTests is set to true in protractor conf file. Both the tests always pass when restartBrowserBetweenTests is set to false in protractor conf file.

Please look into this issue and suggest me solution for the same.

Also the error is very confusing saying windows.angular is undefined when we are already setting browser.ignoreSynchronization=true at the beginning of the test.

Error

Failed: Error while waiting for Protractor to sync with the page: "window.angular is undefined. This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping. See http://git.io/v4gXM for details"

spec.js

describe('github homepage', function() {
it('Test1', function() {
browser.ignoreSynchronization=true;
browser.get("https://github.com/");
element(by.xpath("//input[@aria-label='Search GitHub']")).sendKeys('myrepo');
browser.sleep(5000);
});

it('Test2', function() {
    browser.ignoreSynchronization=true;
    browser.get("https://github.com/");
    element(by.xpath("//input[@aria-label='Search GitHub']")).sendKeys('myrepo');
    browser.sleep(5000);
});

});

@harsha509
Copy link

Hi There,

Facing the similar issue. restartBrowserBetweenTests feature is not working in protractor 4.0.10

@NickTomlin
Copy link
Contributor

This looks like it's covered by #3677 (comment) I'm going to close this to consolidate. Feel free to follow up there!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants