Skip to content

Any way to get pid of browser and chromedriver #2727

Answered by mdmintz
oculunto asked this question in Q&A
Discussion options

You must be logged in to vote

For getting process IDs and other system internals, there's a separate library you can use called psutil:
https://pypi.org/project/psutil/

But if you're just trying to avoid overlapping drivers in UC Mode during browser launches (when not using pytest), then you need to enable SeleniumBase thread-locking (sys.argv.append("-n")) so that the browsers don't try to use the same port at the same. I explained how to do that in the 2nd UC Mode video tutorial on YouTube:
https://www.youtube.com/watch?v=2pTpBtaE7SQ&t=1386s

Replies: 2 comments 14 replies

Comment options

You must be logged in to vote
13 replies
@oculunto
Comment options

@mdmintz
Comment options

@oculunto
Comment options

@mdmintz
Comment options

@oculunto
Comment options

Answer selected by mdmintz
Comment options

You must be logged in to vote
1 reply
@oculunto
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants