我正在使用Chrome驱动程序(74.0.3729.6)和chrome浏览器(74.0.3729.108(正式版本)(64位))执行脚本。启动浏览器时,我们使用chrome选项添加了add块和扩展名。 启动浏览器时,它不执行任何硒命令。而且它也没有显示任何错误。您能告诉我如何解决吗?
Chrome驱动程序(74.0.3729.6) chrome浏览器(74.0.3729.108(Official Build)(64位) 硒版本:3.141.59
Code
WebDriverManager.chromedriver().setup();
ChromeOptions options = new ChromeOptions();
options.addArguments("load-extension=C:\\3.5.2_0");
options.addArguments("--start-maximized");
options.addArguments("--ignore-certificate-errors");
options.addArguments("--disable-popup-blocking");
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
WebDriver driver= new ChromeDriver(capabilities);
I have kept add block plus extention in the below folder
C:\\3.5.2_0
I opened the addblock plus.js file and made the below value as true
defaults.suppress_first_run_page = true; so that it will not open the firstrun.html file