Looking for Selenium command line options for Firefox

93 views
Skip to first unread message

Pete Ford

unread,
Mar 12, 2019, 3:36:08 PM3/12/19
to Selenium Users
Hi everyone,

I am looking for Selenium command line options for Firefox to change the user directory. Basically, I am currently using the following command line option to change the user data directory in Chrome, and I am looking for a similar command line option for Firefox. I do not seem to be able to find it on the Internet. Any help regarding this would be greatly appreciated.

chromeOptions=["user-data-dir=C:\temp"]

Thanks.


⇜Krishnan Mahadevan⇝

unread,
Mar 13, 2019, 2:41:50 AM3/13/19
to Selenium Users
Pete,
Can you please elaborate your problem statement and let us know what you are trying to solve?

AFAIK, the user directory in the Chrome world is equivalent to firefox profiles in the Firefox world. Doesnt a firefox profile work for you?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/98868233-6eb7-4ad5-a263-3044e33ba057%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pete Ford

unread,
Mar 13, 2019, 7:44:21 AM3/13/19
to Selenium Users
Thanks for your reply. I am starting brand new Firefox profile every time the browser is launched, and I have no control over how this is behaving due to project requirements. However, the specific client application I am testing downloads an application to a local user directory where the new profile does not have access to. I need to change the user directory to a different location where I can access it in Firefox. The chromeOptions posted above does exactly what I need in Chrome. I am trying to find the corresponding option in Firefox.

Thanks.

⇜Krishnan Mahadevan⇝

unread,
Mar 13, 2019, 8:59:50 AM3/13/19
to Selenium Users
Pete,

Please take a look at this answer on stackoverflow : https://stackoverflow.com/a/36309735/679824

Basically you should try creating a profile via code, wherein you set the attributes

options.setPreference("browser.download.folderList", 2);
options.setPreference("browser.download.dir", "C:\\Windows\\temp");
options.setPreference("browser.download.useDownloadDir", true);

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/

Mark Collin

unread,
Mar 13, 2019, 9:48:46 AM3/13/19
to Selenium Users
Reply all
Reply to author
Forward
0 new messages