Closed binarykitchen closed 10 years ago
It's not possible, at wd
level. In theory it should be possible to get it in the driver log, but last time I tried I couldn't get it to work in Chrome.
Best is to isolate your test and add a sleep
before quit
, so you have time to open the browser console directly.
Hmmm, cannot do this when I run my e2e tests with PhantomJS ...
You can get the browser console in the phantomjs log, pretty sure.
Yeah, that's possible. Well, I am using this module https://github.com/jmreidy/grunt-mocha-webdriver ... no idea if they expose a PhantomJS instance directly.
wow phantomjs --webdriver=4444
is awesome.
Seems there was some work on the browser console recently https://github.com/detro/ghostdriver/pull/275. As far as I understand you will get the log via the wd/jsonwire log
method, but it hasn't been pulled yet to the npm version of phantomjs.
Wonderful, this is great! Will wait patiently until this is on npm ...
closing, not really a wd issue.
We already have
browser.on('status', ...
andbrowser.on('command', ...
but what about logging?I think it would be extremely helpful to see browser outputs of
console.log
as well. Sometimes I debug for hours for a small bug. If I could see those logs, I'd save lots of time.