Firefox browser's download path changing is not working

62 views
Skip to first unread message

Dinesh kumar

unread,
Feb 20, 2020, 9:36:13 AM2/20/20
to Selenium Users
Hi all,

Firefox browser's  download path changing is not working(version  selenium-server-4.0.0-alpha-3).

The code for Firefox is:-

FirefoxProfile profile =new FirefoxProfile();
profile.setPreference("browser.download.folderList",2);
profile.setPreference("browser.download.dir","/Users/dinesh/Documents/");
profile.setPreference("browser.download.manager.showWhenStarting",false);
FirefoxOptions options = new FirefoxOptions();
options.setProfile(profile);
driver=new EventFiringWebDriver(new FirefoxDriver(profile));

I have gone through many Google answers but I found no solution for this issue.
Any help please?

##Environment Details:
Firefox  Browsers :Firefox 72.0.2 (64-bit)
OS: MacBook Pro
Programming Language: java
Gem : selenium-webdriver (version  selenium-server-4.0.0-alpha-3)

John Pulwers

unread,
Feb 20, 2020, 9:47:54 AM2/20/20
to seleniu...@googlegroups.com
THANKS! I thought I was the first only one.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f24e3335-30d1-45c0-9a85-aaa352c48b20%40googlegroups.com.

Joe Ward

unread,
Feb 20, 2020, 11:15:08 AM2/20/20
to seleniu...@googlegroups.com
Wouldn't this be a Gekkodriver issue and not Selenium?

John Pulwers

unread,
Feb 20, 2020, 12:38:12 PM2/20/20
to seleniu...@googlegroups.com
I am brand new at this: I heard getting Selenium configured wasn't easy. Lo & Behold; I cannot get the geckodriver.exe to invoke the FireFox browser.

Below is my code to do this, which I'm pretty sure is correct, so I think my issue is with the download of the exe file or the path id. Can someone point to directions on how, where to download this file from and how to point out the correct path?

IWebDriver driver = new geckodriver.exe();

--

Shawn McCarthy

unread,
Feb 20, 2020, 3:05:28 PM2/20/20
to Selenium Users
Hi John, I am not sure where you got that command, but it should probably be something like:
        IWebDriver driver = new FirefoxDriver();

geckodriver.exe has to be on the PATH, so selenium knows where to find it.


On Thursday, February 20, 2020 at 10:38:12 AM UTC-7, John Pulwers wrote:
I am brand new at this: I heard getting Selenium configured wasn't easy. Lo & Behold; I cannot get the geckodriver.exe to invoke the FireFox browser.

Below is my code to do this, which I'm pretty sure is correct, so I think my issue is with the download of the exe file or the path id. Can someone point to directions on how, where to download this file from and how to point out the correct path?

IWebDriver driver = new geckodriver.exe();

On Thu, Feb 20, 2020 at 9:36 AM Dinesh kumar <mkdine...@gmail.com> wrote:
Hi all,

Firefox browser's  download path changing is not working(version  selenium-server-4.0.0-alpha-3).

The code for Firefox is:-

FirefoxProfile profile =new FirefoxProfile();
profile.setPreference("browser.download.folderList",2);
profile.setPreference("browser.download.dir","/Users/dinesh/Documents/");
profile.setPreference("browser.download.manager.showWhenStarting",false);
FirefoxOptions options = new FirefoxOptions();
options.setProfile(profile);
driver=new EventFiringWebDriver(new FirefoxDriver(profile));

I have gone through many Google answers but I found no solution for this issue.
Any help please?

##Environment Details:
Firefox  Browsers :Firefox 72.0.2 (64-bit)
OS: MacBook Pro
Programming Language: java
Gem : selenium-webdriver (version  selenium-server-4.0.0-alpha-3)

--
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 seleniu...@googlegroups.com.

Anil Gursahani

unread,
Feb 20, 2020, 4:27:16 PM2/20/20
to seleniu...@googlegroups.com
Hi Dinesh,

I think you need to initialize the FirefoxDriver with the instance of FirefoxOptions instead of instance of FirefoxProfile

Can you please try - driver = new EventFiringWebDriver(new FirefoxDriver(options)) ; 

The code should be

FirefoxProfile profile =new FirefoxProfile();
profile.setPreference("browser.download.folderList",2);
profile.setPreference("browser.download.dir","/Users/dinesh/Documents/");
profile.setPreference("browser.download.manager.showWhenStarting",false);
FirefoxOptions options = new FirefoxOptions();
options.setProfile(profile);
driver=new EventFiringWebDriver(new FirefoxDriver(options));

Thanks,

Anil

John Pulwers

unread,
Feb 20, 2020, 7:59:17 PM2/20/20
to seleniu...@googlegroups.com
GREAT! I'll try it tomorrow.

To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/8338b831-6fb2-4f35-826f-67d4be0bd609%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages