Selenium-Remote-Driver icon indicating copy to clipboard operation
Selenium-Remote-Driver copied to clipboard

Feature Request: constructor param to trigger cleanup upon destruction

Open troglodyne opened this issue 7 years ago • 3 comments

I've had to add reaper configuration/scripts to selenium heads due to dies in Selenium::Remote::Driver tests (or END blocks to tests themselves) that just call $obj->quit(); to cleanup any windows. I know that leaving windows up when something dies can be useful for diagnostic purposes, but when not "debugging" why a test would fail, you really don't need this.

As such, I would like to request that the new() constructor be given a named argument (acting as a flag) to enable automatic reaping of the window(s) we spawned during execution. Then I could just set that in my constructors instead and not have to worry about that as much.

troglodyne avatar Aug 07 '17 20:08 troglodyne

I assume we don't want it to clean up on SIGINT? Or should that be controllable too?

teodesian avatar Aug 09 '17 13:08 teodesian

Yes, I'd presume that if the user interrupted the script (SIGINT), they would want the window to stay there for examination.

troglodyne avatar Aug 10 '17 01:08 troglodyne

Ok, will aim to make this next release.

teodesian avatar Sep 06 '17 13:09 teodesian