mobile chrome emulator not working

26 views
Skip to first unread message

mamaduru...@gmail.com

unread,
Jul 14, 2020, 6:52:58 PM7/14/20
to ChromeDriver Users

ChromeOptions chromeOptions = new ChromeOptions();

Map<String, String> mobileEmulation = new HashMap<>();

mobileEmulation.put("deviceName", "Nexus 5");

chromeOptions.setExperimentalOption("mobileEmulation", mobileEmulation);

WebDriver driver = new ChromeDriver(chromeOptions);


        driver.get("https://www.google.com");


       Thread.sleep(5000);


While running this , its opening in a normal browser not in Nexus 5

pls help

John Chen

unread,
Jul 14, 2020, 7:13:55 PM7/14/20
to mamaduru...@gmail.com, ChromeDriver Users
The code looks correct to me. Which versions of Selenium library and ChromeDriver are you using? It would also help if you can attach verbose log from ChromeDriver.

--
You received this message because you are subscribed to the Google Groups "ChromeDriver Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromedriver-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chromedriver-users/b892bd25-b6ab-4d1b-8ac6-fa7c48f4ea34o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages