I'm trying to write some automated tests for Firefox using Marionette and its Python client, but Python doesn't seem to be able to launch Python with a specified profile. This is a problem because I need two Firefox profiles for the test. I'm trying to use subprocess.call(['C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe', '-P Marionette'])
but instead it launches using the default Firefox profile (which is not that one). Can Marionette change the current Firefox profile, or can Python use command line arguments to run with a specific profile?
Asked
Active
Viewed 294 times
0

Inglonias
- 468
- 1
- 5
- 18
-
I've got a batch script workaround that starts both Firefox sessions `start "" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -P Marionette -no-remote` and then the other profile as well, before starting the python script itself. Is there a better way? – Inglonias Jun 15 '16 at 16:09
1 Answers
0
"-P Marionette"
must be two different entries in the list.
so use
subprocess.call([firefox_fullpath, "-p", "Marionette"])
"-P Marionette" are technically two arguments (applies for any OS I know of).

Markus
- 592
- 3
- 13