I’m trying to use a custom profile in with an add-on, I can open the profile, URL, I even see the add-on icon on top bar but is always set into the disabled mode, I need to set it to active all time. The add-on is ‘anonymous’
below is what I did, but no success.

public class SeleniumScript {
    static WebDriver driver;
    public static void main(String args[]) throws Exception {
System.setProperty("webdriver.gecko.driver", "E:\Library\-v0.21.0-win32\.exe");
            ProfilesIni profile2 = new ProfilesIni();
            FirefoxProfile profile3 = profile2.getProfile("AutoProfile");
            FirefoxOptions firefoxOptions = new FirefoxOptions();
            firefoxOptions.setProfile(profile3);
            File file = new File("C:\Users\xxx\AppData\Roaming\Mozilla\Firefox\Profiles\vjo848oc.AutoProfile\extensions\[email protected]");
            profile3.addExtension(file);
            profile3.setPreference("extensions.anonymox.currentVersion", "4.1"); 
            driver = new (firefoxOptions);
            String baseURL = "http://abc.com";
            driver.get(baseURL);
            driver.manage().window().maximize();
            }
    }



Source link https://sqa.stackexchange.com/questions/34911/how-to-launch-firefox-geckodriver-with-add-on--in--

LEAVE A REPLY

Please enter your comment!
Please enter your name here