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

Restarting forked browsers is broken #3896

Closed
sjelin opened this issue Dec 30, 2016 · 1 comment
Closed

Restarting forked browsers is broken #3896

sjelin opened this issue Dec 30, 2016 · 1 comment

Comments

@sjelin
Copy link
Contributor

sjelin commented Dec 30, 2016

Let's say you do the following:

let b2 = browser. forkNewDriverInstance()
b2.restart()

Because restart assumes it's being called against the global browser instance, the global browser instance will be overwritten with the restarted b2 instance, and b2 will still be pointing to original (now closed) forked instance.

I propose we have restart return the new instance. We can still overwrite the global instance when appropriate too (just add an if statement here). So now the code will be:

let b2 = browser. forkNewDriverInstance()
b2 = b2.restart()

Whatever we end up doing to forkNewDriverInstance in #3892 we'll have to also do to restart for async/await users.

sjelin added a commit to sjelin/protractor that referenced this issue Jan 23, 2017
Also allows `browser.restart` to work when the control flow is disabled, and
fixes it for forked browsers.

Closes angular#3899 and
angular#3896
sjelin added a commit to sjelin/protractor that referenced this issue Jan 23, 2017
Also allows `browser.restart` to work when the control flow is disabled, and
fixes it for forked browsers.

Closes angular#3899 and
angular#3896
sjelin added a commit to sjelin/protractor that referenced this issue Jan 25, 2017
Also allows `browser.restart` to work when the control flow is disabled, and
fixes it for forked browsers.

Closes angular#3899 and
angular#3896
sjelin added a commit to sjelin/protractor that referenced this issue Jan 26, 2017
Also allows `browser.restart` to work when the control flow is disabled, and
fixes it for forked browsers.

Closes angular#3899 and
angular#3896
sjelin added a commit that referenced this issue Jan 26, 2017
Also allows `browser.restart` to work when the control flow is disabled, and
fixes it for forked browsers.

Closes #3899 and
#3896
sjelin added a commit that referenced this issue Jan 26, 2017
Also allows `browser.restart` to work when the control flow is disabled, and
fixes it for forked browsers.

Closes #3899 and
#3896
sjelin added a commit to sjelin/protractor that referenced this issue Jan 27, 2017
Also allows `browser.restart` to work when the control flow is disabled, and
fixes it for forked browsers.

Closes angular#3899 and
angular#3896
@sjelin
Copy link
Contributor Author

sjelin commented Jan 31, 2017

Fixed by b77cb92

@sjelin sjelin closed this as completed Jan 31, 2017
igniteram pushed a commit to igniteram/protractor that referenced this issue Feb 21, 2017
Also allows `browser.restart` to work when the control flow is disabled, and
fixes it for forked browsers.

Closes angular#3899 and
angular#3896
bodyduardU pushed a commit to bodyduardU/protractor that referenced this issue Dec 5, 2022
Also allows `browser.restart` to work when the control flow is disabled, and
fixes it for forked browsers.

Closes angular/protractor#3899 and
angular/protractor#3896
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant