package base;import org.openqa.selenium.*;import org.openqa.selenium.ie.*;import org.openqa.selenium.WebDriver;import org.openqa.selenium.By;import org.openqa.selenium.WebElement;import org.openqa.selenium.firefox.FirefoxDriver;import org.openqa.selenium.firefox.FirefoxOptions;import org.openqa.selenium.firefox.FirefoxProfile;import org.openqa.selenium.firefox.internal.ProfilesIni;import org.openqa.selenium.support.ui.ExpectedCondition;import org.openqa.selenium.support.ui.WebDriverWait;import java.util.*;import java.io.*;public class Class1 {
public static void main(String[] args) { //FirefoxOptions options = new FirefoxOptions(); //options.addPreference("browser.tabs.remote.autostart.2", false); //firefoxprofile.addExtension(addonpath); //WebDriver driver = new FirefoxDriver(options); ProfilesIni profile = new ProfilesIni(); FirefoxProfile myprofile = profile.getProfile("ISTSDashboard"); WebDriver driver = new FirefoxDriver(myprofile); driver.get("https://www.google.com");You should be doing something like this :
public static void main(String[] args) {
FirefoxOptions options = new FirefoxOptions();
options.setProfile(getProfile("myprofile"));
FirefoxDriver driver = new FirefoxDriver(options);
}
private static FirefoxProfile getProfile(String profileName) {
if (profileName == null || profileName.trim().isEmpty()) {
return new FirefoxProfile();
}
return new ProfilesIni().getProfile(profileName);
}
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/
--
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 post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/60f13393-fb11-45ec-bae8-6acd404d978a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.