我在用:
driver.manage().window().maximize();
最大化 Chrome 屏幕,但它不起作用并给我一条消息:
this statement is not getting executed. version of chrome is:Version 62.0.3202.75 (Official Build) (64-bit)
谁能帮我解决这个问题。
最佳答案
如果您需要在启动时最大化窗口,请使用以下代码。
System.setProperty("webdriver.chrome.driver",prop.getProperty("driverpath"));
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--start-maximized");
WebDriver driver= new ChromeDriver(chromeOptions);
关于google-chrome - driver.manage().window().maximize();不管用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47132346/