Emulate Chrome Browser into mobile View by Using Selenium part-1
WebDriver driver ; ChromeOptions chromeOptions ; @BeforeClass public void Resources() { System. setProperty ( "webdriver.chrome.driver" , "/Users/abc/Desktop/chromedriver/chromedriver" ); Map<String, String> mobileEmulation = new HashMap<>(); mobileEmulation .put( "deviceName" , "iPhone 6/7/8" ); chromeOptions = new ChromeOptions(); chromeOptions .setExperimentalOption( "mobileEmulation" , mobileEmulation ); driver = new ChromeDriver( chromeOptions ); }