I am having problems using an existing Firefox Profile in Jenkins server. Locally, everything is working fine. I am using the following code block to use the Firefox profile:
System.setProperty("webdriver.gecko.driver", "C:\\path\\to\\geckodriver.exe");
ProfilesIni profile = new ProfilesIni();
FirefoxProfile testprofile = profile.getProfile("selenium-profile");
FirefoxOptions opt = new FirefoxOptions();
opt.setProfile(testprofile);
WebDriver driver = new FirefoxDriver(opt);
driver.get("https://www.google.com");
The error shown on Jenkins:
org.openqa.selenium.WebDriverException: Unexpected value for profile: null