Launch Chrome with device emulation (e.g. iPhone 5) using command line

4,433 views
Skip to first unread message

scottmor...@gmail.com

unread,
May 8, 2014, 6:06:17 PM5/8/14
to google-chrome-...@googlegroups.com
I've looked around quite a bit and haven't been able to find a way to launch Chrome from the command line emulating a device (for instance the iPhone 5). The only thing I've seen is an unanswered stack overflow question.

My use case for this is that I'm using the Karma test runner as maintained by the Angular team and would like to do unit tests inside of common mobile devices. In order to automate opening the browser in emulation mode, I need a way to open Chrome from the command line with a specified mode. I'm using windows, so for example, a command like 

C:\\chrome-directory\chrome.exe --emulation-mode=iphone5

As far as I can tell this option does not exist but I would love to be told I'm wrong. Any info on this?

Thanks,
-Scott
 

dgo...@chromium.org

unread,
May 12, 2014, 8:25:21 AM5/12/14
to google-chrome-...@googlegroups.com
Hi,

There is no such option. Please file a feature request at crbug.com/new, and it may be implemented in some way if there is enough demand.

Thanks,
Dmitry

rammi...@gmail.com

unread,
May 13, 2014, 3:20:27 AM5/13/14
to google-chrome-...@googlegroups.com
Am am hoping for the same thing. Basically to send a user of Chrome a URL that when launched in Chrome emulates the mobile view of a website without them having to click Developer Tools, etc.

Did you get any further here? :-)

Scott Morton Ashton

unread,
May 14, 2014, 12:38:09 PM5/14/14
to google-chrome-...@googlegroups.com, rammi...@gmail.com
I posted a feature request. You should go in and bump it :-)


-Scott

Rammiz Omar

unread,
May 15, 2014, 5:58:58 AM5/15/14
to Scott Morton Ashton, google-chrome-...@googlegroups.com
done! :-)
Reply all
Reply to author
Forward
0 new messages