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

Multiple uses of browser.pause() cause protractor to exit #3501

Closed
heathkit opened this issue Aug 29, 2016 · 2 comments
Closed

Multiple uses of browser.pause() cause protractor to exit #3501

heathkit opened this issue Aug 29, 2016 · 2 comments

Comments

@heathkit
Copy link
Contributor

For example, if we add two browser.pause() statements to the following test

  fit('should wait to grab the WebElement until a method is called', function() {
    // These should throw no error before a page is loaded.
    var usernameInput = element(by.model('username'));
    var name = element(by.binding('username'));

    browser.get('index.html#/form');

    expect(name.getText()).toEqual('Anon');

    browser.pause();
    usernameInput.clear();
    usernameInput.sendKeys('Jane');
    browser.pause();
    expect(name.getText()).toEqual('Jane');
  });

If we run the test and then either step through or exit the debugger, protractor exits claiming that the debug port is already in use. This is because the debug process is still running.

Protractor should ignore browser.pause() calls if the debugger is already running. It should also wait for the previous browser process to exit before trying to start a new one. Unfortunately, I don't know how to distinguish between the debugger stepping over a browser.pause() call manually.

@igniteram
Copy link
Contributor

+1 , I observed the same issue sometime while ago but ignored it by changing the port no. in the second pause browser.pause(5959); as 5858 is the default port, It would be a good feature to use the same port again!

@heathkit
Copy link
Contributor Author

I do have a fix for this, I'll be putting out a PR soon.

@heathkit heathkit added this to the 4.1.0 milestone Sep 1, 2016
@heathkit heathkit closed this as completed Sep 1, 2016
@heathkit heathkit reopened this Sep 1, 2016
@heathkit heathkit modified the milestones: Upcoming, 4.1.0 Sep 3, 2016
@heathkit heathkit closed this as completed Sep 3, 2016
@heathkit heathkit modified the milestones: 4.0.5, Upcoming Sep 7, 2016
This issue was closed.
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

2 participants