W
W
whowho2020-04-15 22:02:00
Node.js
whowho, 2020-04-15 22:02:00

How to get the path to the currently running Firefox browser profile in selenium-webdriver?

After the firefox browser is launched, a profile is created and stored in some temporary folder /tmp/rust_mozprofileXXXXXX.
How, using selenium-webdriver, to get the path to such a running temporary Firefox browser profile (from within the code, I mean)?
Used NodeJS v12.16.1, Mozilla Firefox 72.0.1, selenium-webdriver 3.6.0, geckodriver 1.19.1.

Well, in addition to this, how can I get the id of the browser process (from inside the code, I mean)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
whowho, 2020-04-15
@whowho

I came up with some solution for several browsers running in parallel: and then, for example, using the command to get the path to the folder of a specific profile. But due to the crutch of such a solution, I will be glad to get a more elegant version)
options.addArguments("-zzzzzzzzz");
ps -AlF | grep zzzzzzzzz

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question