package com.thefirst171020;
import java.awt.Dimension;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Browser {
public static void main(String[] args) {
System.out.println("start selenium");
System.setProperty("webdriver.chrome.driver","C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe");
WebDriver driver=new ChromeDriver();
// driver.manage().window().maximize();
driver.manage().window().setSize(new Dimension(1280,800));
driver.get("https://baidu.com");
driver.quit();
System.out.println("end");
}
}
setSize报错:The method setSize(org.openqa.selenium.Dimension) in the type WebDriver.Window is not applicable for the arguments (java.awt.Dimension)