MaxFrost
MaxFrost

Reputation: 91

Does Selenium quit() affect other instances?

I know this is a trivial question but no description of the close and quit function answered my question. I want to run 2 python scripts in parallel and close them properly by calling the quit() function. What I don´t understand is: Does quit() close the instance of the second script too ?

Is this a XY Problem? Maybe since this question came up when i noticed that calling close() leaves me with a lot of used ram and dead webdriver/chrome processes. So to put it in other words: how do I exit selenium in a clean way?

Upvotes: 0

Views: 93

Answers (1)

Prophet
Prophet

Reputation: 33351

It is absolutely clear that quit() method applied on particular driver object will close that particular driver session only.
This can not have any influence on any other driver objects / sessions if you have such anywhere in you system / memory / anywhere in the universe.
Normally we use close() method only if we want to close some open browser tab and probably to continue working on the same driver object / session. In case you want to close the entire session quit() method should be used.

Upvotes: 1

Related Questions