Puppeteer offers a way to terminate/close workers. For dedicated workers, it can be done by evaluating a script calling self.close() but for other worker types it might not be so easy since the WebDriver instrumentation may prevent workers from closing. Service workers do not support self.close() method as well.
Perhaps, WebDriver BiDi should specify a command for closing a worker realm:
Puppeteer offers a way to terminate/close workers. For dedicated workers, it can be done by evaluating a script calling
self.close()
but for other worker types it might not be so easy since the WebDriver instrumentation may prevent workers from closing. Service workers do not supportself.close()
method as well.Perhaps, WebDriver BiDi should specify a command for closing a worker realm:
1) for service workers, following https://w3c.github.io/ServiceWorker/#terminate-service-worker 2) for other workers, following the
self.close()
algorithmThis is a useful command when testing lifecycle behavior of workers. cc @Lightning00Blade