Hi
I am trying to make profiles class. Buy it says cannot instaniate the type ProfilesIni
even on Selenium website it says it is Deprecated (it might change in future) and it gives a yellow warning.
ackage module13;
import org.openqa.selenium.PageLoadStrategy;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.testng.annotations.Test;
public class loadingoptions<ProfilesIni> {
@Test
public void execute () {
String browser = "mozilla";
WebDriver driver = null;
if(browser.equals("mozilla")){
driver = new FirefoxDriver ();}
else if (browser.equals("chrome")){
driver =new ChromeDriver ();
}}
public FirefoxOptions loadfirefixoptions() {
System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE, "null");
FirefoxOptions options = new FirefoxOptions();
options.setPageLoadStrategy(PageLoadStrategy.EAGER);
ProfilesIni allprof = new ProfilesIni();
FirefoxProfile prof = allProf.getProfile("Ginni");
prof.setPreference("dom.webnotifications.enabled", false);// turn off
prof.setAcceptUntrustedCertificates(true);
prof.setAssumeUntrustedCertificateIssuer(false);
options.setProfile(prof);
return options;
Instructor
Ashish Thakur Replied on 09/04/2019
Please share the error stack trace.
It is possible that you are using the older profiles ini class instead of the new one.