I have created a new Firefox profile, and want to call the profile in my selenium code to load Firefox using this profile (plugins, etc).
Given the code below.
System.setProperty("webdriver.gecko.driver","D:\\Software\\Firefox\\Driver\\geckodriver-v0.10.0-win64\\geckodriver.exe");
FirefoxProfile profile = new FirefoxProfile(new File("C:\\Users\\Dev 8\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\j3yl2vj7.MyTest02"));
WebDriver driver = new FirefoxDriver(profile);
It opens Firefox with the default settings, instead of with my particular profile with the plugins etc.
Version information:
根据此博客文章,您需要使用Java 8运行Selenium 3.0。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.