Java 硒便携式铬开孔机
为什么selenium会像这样用便携式Chrome打开cmd 我可以把它藏起来吗?或者我可以一直在上面启动便携式chrome吗?因为我正在使用autoit进行代理身份验证,但这个cmd有时会在顶部。我正在发送alt+tab和autoit以选择chrome,但有时chrome位于顶部 我的代码:Java 硒便携式铬开孔机,java,selenium,google-chrome,Java,Selenium,Google Chrome,为什么selenium会像这样用便携式Chrome打开cmd 我可以把它藏起来吗?或者我可以一直在上面启动便携式chrome吗?因为我正在使用autoit进行代理身份验证,但这个cmd有时会在顶部。我正在发送alt+tab和autoit以选择chrome,但有时chrome位于顶部 我的代码: ChromeOptions options = new ChromeOptions(); options.setExperimentalOption("mobileEmulation", mob
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("mobileEmulation", mobileEmulation);
options.addArguments("--remote-debugging-port=9222");
options.addArguments("--lang=en");
options.addArguments("window-size=1078,924");
options.setBinary("E:\\Chromelar\\Chrome1\\GoogleChromePortable.exe");
System.setProperty("webdriver.chrome.driver", "D:\\SelenimuDriver\\chromedriver.exe");
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.whatismybrowser.com/");
我有一个非常相似的问题。在便携式安装中,您应该有一个App/Chrome bin/文件夹,其中有一个Chrome.exe。在我的系统中看起来是这样的
[...]\GoogleChromePortable64\App\Chrome-bin\chrome.exe
所以试着找到chrome.exe,它应该是
options.setBinary("E:\\Chromelar\\Chrome1\\App\\Chrome-bin\\chrome.exe");
在执行这个chrome.exe而不是GoogleChromePortable.exe之后,cmd就消失了。我用ChromeWebDriver版本81做的