mangin.alexander
mangin.alexander

Reputation: 77

FirefoxDriver: enable plugins

I can't find FirefoxDriver's option, which equivalents --always-authorize-plugins in ChromeDriver.

Does FirefoxDriver contain an equivalent option?

P.S. --always-authorize-plugins enables all plugin in ChromeDriver.

Upvotes: 1

Views: 1387

Answers (2)

mangin.alexander
mangin.alexander

Reputation: 77

I find a solution for my problem.

My Solution:

  1. close firefox
  2. open firefox with flag -p. win + r => "firefox.exe + -p"
  3. create a new firefox profile
  4. find full path to the profile %APPDATA%/Mozila/Firefox/Profiles/[profileName]
  5. then I start webDriver with the profile

    var until = require('selenium-webdriver').until,
    firefox = require('selenium-webdriver/firefox');
    var options = new firefox.Options();
    options.setProfile([fullPath]);
    var driver = new firefox.Driver(options);
    driver.get('www.google.com');
    driver.wait(until.titleIs('webdriver - Google Search'), 20000);
    driver.quit();

  6. activate need plugins while firefox is open.

  7. restart webDriver.

Upvotes: 2

Programmer
Programmer

Reputation: 475

Try "plugin.state.java" = 2 in FireFox Profile

Upvotes: 1

Related Questions