2016-12-07 5 views

Antwort

0
public static void main(String[] args) { 
    System.setProperty("webdriver.chrome.driver", "/Users/guolei/tmp/chromedriver"); 
    Map<String, String> mobileEmulation = new HashMap<>(); 

    mobileEmulation.put("deviceName", "iPhone 6"); 

    ChromeOptions chromeOptions = new ChromeOptions(); 
    chromeOptions.setExperimentalOption("mobileEmulation", mobileEmulation); 
    chromeOptions.addArguments("start-maximized"); 

    WebDriver driver = new ChromeDriver(chromeOptions); 

    driver.get("http://m.taoche.com/"); 
} 
Verwandte Themen