【发布时间】:2022-01-20 06:25:02
【问题描述】:
我想使用我的自定义 Firefox 配置文件,但我收到了弃用警告
ProfilesIni myProfile = new ProfilesIni();
@SuppressWarnings。我该如何解决这个问题。
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.internal.ProfilesIni;
import org.openqa.selenium.firefox.FirefoxProfile;
//System.setProperty("C:\\driver\\geckodriver.exe");
ProfilesIni myProfile = new ProfilesIni();
FirefoxProfile test = myProfile.getProfile("selenium 1");
WebDriver driver = new FirefoxDriver(test);
driver.manage().window().maximize();
driver.get("https://www.google.com");
【问题讨论】:
标签: java selenium selenium-firefoxdriver suppress-warnings deprecation-warning