java如何向json添加设置。selenium的exe文件
我指的是一个应用程序,在selenium上用作我的驱动程序
public static WebDriver startDriverTwo() {
String projectLocation = System.getProperty("user.dir");
System.setProperty("webdriver.chrome.driver", projectLocation + "/chromedriver.exe");
ChromeOptions opt = new ChromeOptions();
//Enter the path of your app
opt.setBinary("C:/pathtoapp.exe");
//opt.setBinary()
opt.addArguments("start-maximized");
driver = new ChromeDriver(opt);
System.out.println("opening app");
return driver;
但是我需要添加一个设置。要使此应用程序正常工作,可以在DriverFactory中添加此文件吗?应用程序在selenium之外启动时工作正常,而从selenium运行时工作不正常
共 (0) 个答案