def kill ( self ) : if self . process : self . process . kill ( ) self . process . wait ( )
how to kill a running python script
Kill the browser .
def kill(self):
        """Kill the browser.

        This is useful when the browser is stuck.
        """
        if self.process:
            self.process.kill()
            self.process.wait()