Skip to content

Selenium Remote Web Driver not starting with Firefox Profile given #9762

@alexfernandezv

Description

@alexfernandezv

🐛 Bug Report

Test Case

I want to install a custom extension in a Firefox remote web driver. To achieve that I have created a FirefoxProfile and added the custom extension via setExtension. The problem is that the profile I have just created is not added to the Driver instance. Here is the piece of code I have used:

          File firefoxExtension = new File("src\\main\\resources\\browser-extensions\\firefox-extension.xpi");
          FirefoxProfile profile = new FirefoxProfile();
          profile.addExtension(firefoxExtension);
          FirefoxOptions options = new FirefoxOptions();
          options.setProfile(profile);
          capabilities.setCapability(FirefoxOptions.FIREFOX_OPTIONS,options);

        try {
            return new RemoteWebDriver(new URL("https://" + username + ":" + accessKey + "@"
                    + environmentVariables.getProperty("browserstack.server") + "/wd/hub"), capabilities);
        } catch (Exception e) {
            System.out.println(e);
            return null;
        }

System

Remote Platform: Windows 10
Firefox version: 68
Selenium: 3.141.59
Selenium Hub: Browser Stack

Expected result

  1. Browser opened
  2. Profile loaded with the extension
  3. Browser can be interacted using RemoteWebDriver

Metadata

Metadata

Assignees

No one assigned

    Labels

    J-awaiting answerQuestion asked of user; a reply moves it to triage again

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions