I'm trying to get a simple test case to work with browser.pause(), but the test goes past the pause, finishing the test and closing the browser.
There is stuff related to the debugger printed to the screen, but there is no pause.
Same thing for .debugger().
This is on Windows 7 64b (hmmm, maybe this is a fork issue?)
protractor 1.6.1
node 0.10.30
selenium standalone v2.44 (I think, screen dump at bottom)
My conf.js is:
exports.config = {
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
capabilities: {
'browserName': 'chrome'
},
specs: ['example_spec.js']
};
The test is (this might look familiar):
describe('angularjs homepage', function() {
describe('todo list', function() {
var todoList;
beforeEach(function() {
browser.get('http://www.angularjs.org');
todoList = element.all(by.repeater('todo in todos'));
});
it('should add a todo', function() {
var addTodo = element(by.model('todoText'));
var addButton = element(by.css('[value="add"]'));
browser.pause();
addTodo.sendKeys('write a protractor test');
addButton.click();
expect(todoList.count()).toEqual(3);
expect(todoList.get(2).getText()).toEqual('write a protractor test');
});
});
});
This is what I get when I run:
>protractor conf.js
Using the selenium server at http://127.0.0.1:4444/wd/hub
[launcher] Running 1 instances of WebDriver
Starting debugger agent.
debugger listening on port 5858
Starting WebDriver debugger in a child process. Pause is still beta, please report issues at github.com/angular/protractor
------- WebDriver Debugger -------
ready
press c to continue to the next webdriver command
press d to continue to the next debugger statement
type "repl" to enter interactive mode
type "exit" to break out of interactive mode
press ^C to exit
.
Finished in 4.407 seconds
1 test, 2 assertions, 0 failures
[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1 passed
webdriver startup screen dump
>webdriver-manager start
seleniumProcess.pid: 52452
16:38:09.368 INFO - Launching a standalone server
Setting system property webdriver.chrome.driver to C:\Users\Mikael\AppData\Roaming\npm\node_modules\protractor\selenium\chromedriver.exe
Setting system property webdriver.ie.driver to C:\Users\Mikael\AppData\Roaming\npm\node_modules\protractor\selenium\IEDriverServer.exe
16:38:09.474 INFO - Java: Oracle Corporation 25.20-b23
16:38:09.474 INFO - OS: Windows 7 6.1 amd64
16:38:09.486 INFO - v2.44.0, with Core v2.44.0. Built from revision 76d78cf
16:38:09.635 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
16:38:09.636 INFO - Version Jetty/5.1.x
16:38:09.638 INFO - Started HttpContext[/selenium-server,/selenium-server]
16:38:09.728 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@35851384
16:38:09.728 INFO - Started HttpContext[/wd,/wd]
16:38:09.728 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
16:38:09.729 INFO - Started HttpContext[/,/]
16:38:09.735 INFO - Started SocketListener on 0.0.0.0:4444
16:38:09.735 INFO - Started org.openqa.jetty.jetty.Server@30dae81
I suspect it's a windows issue, but I don't have a windows machine right now. Julie said she might be able to find a windows machine and test this behavior later..so pending for now
Er, um, I should probably not have had my node server also in debug on 5858.
Works now.
FYI, there's an optional parameter you can pass to pause to use a different port, e.g. browser.pause(5859) should work!
Hi,
I encounter the same issue. Here a video of the step to reproduce :
https://drive.google.com/open?id=1VFmRjsNvfu_atfEV5vRg6XoXSYBsGUZN
Maybe it has something to do with : _debugger module not available on Node.js 8 and higher.
Most helpful comment
FYI, there's an optional parameter you can pass to
pauseto use a different port, e.g.browser.pause(5859)should work!