juliangruber / browser-run

Run code inside a browser from the command line
447 stars 62 forks source link

Autoclose? #21

Closed peteruithoven closed 9 years ago

peteruithoven commented 9 years ago

When using the cli, is there anyway to automatically close browsers after some task "finished"? Would it be possible to call something in javascript that browser-run picks up and have it stop itself?

I'm using browser-run to run unit testing and when their done I'd like it to automatically close the browser again. (It now closes the browser when it stop the browser-run process (with ctrl+c)).

juliangruber commented 9 years ago

we can't automatically determine when something's done, but yeah, a window.close() could work! i'll try to come up with something

juliangruber commented 9 years ago

starting at 2.4.0, calling window.close() in phantomjs (and possibly other browsers) will completely end the browser-run instance