且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用selenium webdriver打开特定的浏览器

更新时间:2023-09-01 08:30:16

只需指定版本二进制文件的路径即可。例如 -

Just specify the path to the binary of the version..may be, like-

FirefoxBinary binary = new FirefoxBinary(new File("path_to_bin"));
FirefoxProfile profile = new FirefoxProfile();
WebDriver driver = new FirefoxDriver(binary, profile);