【发布时间】:2018-09-15 22:11:58
【问题描述】:
有人可以帮我处理这段代码吗?目前它会在第 4 行抱怨 : webDriver = 新的 FirefoxDriver(ff_ep_profiles) 说它无法解析构造函数。我需要加载我的扩展,因此我正在创建一个配置文件
FirefoxProfile ff_ep_profile = new FirefoxProfile(new File("C:\\Users\\admin\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\81uy033g.FirefoxEP"));
FirefoxOptions option=new FirefoxOptions();
option.setProfile(ff_ep_profile);
webDriver = new FirefoxDriver(ff_ep_profile);
【问题讨论】:
-
WebDriver 驱动在哪里?也许您正在尝试创建一个变量 webDriver,而不是 WebDriver driver=new FirefoxDriver(ff_ep_profile);
标签: java selenium selenium-webdriver webdriver