As the documentation states, you can call webdriver.FirefoxProfile() with the optional argument of profile_directory
to point to the directory of a specific profile you want the browser to use. I noticed it was taking a long time to run this command, so when I looked into the code, it looked like it was copying the specified profile Problem is, it takes an extremely long time for the profile to copy (something like >30 minutes, didn't have the patience to wait for it to finish.)
I'm using a hybrid of userscripts and selenium to do some automation for me, so to setup a new profile every single time I want to test out my code would be burdensome.
Is the only way to change this behaviour to edit the firefox_profile.py
itself (if so, what would be the best way to go about it?)?
As per the current implementation of GeckoDriver with Firefox using the
FirefoxProfile()
works as follows :If case of initiating a Browsing Session through a new Firefox Profile as follows :
A new rust_mozprofile gets created on the run as follows :
Of-coarse on a successful closure (i.e. successful invocation of
driver.quit()
) the temporary rust_mozprofile.xFayqKkZrOB8 gets deleted/destroyed completely.Again in case of initiating a Browsing Session through an existing Firefox Profile() as follows :
Similarly a new rust_mozprofile gets created on the run as follows :
Similarly in this case as well on a successful closure (i.e. successful invocation of
driver.quit()
) the temporary rust_mozprofile.2oSwrQwQoby9 gets deleted/destroyed completely.FirefoxProfile()
to scoop out a new rust_mozprofile.Perhaps as per your question timespan for profile to copy (something like >30 minutes) is a pure overhead. But No, it's not possible to use a Firefox Profile without making a copy of rust_mozprofile.
Solution
@Test
.