Reputation: 75
When connected to a device and using the Chrome Developer Tools Remote Debugging, is there a way to tell your device to visit a new URL rather than just choosing one of pages that are already thumbnailed?
Thanks in advance,
Martin
Upvotes: 4
Views: 1458
Reputation: 170
You can pick one of the pages that are thumbnailed (i.e. one of the open tabs), and in the developer tools for that page, go to the console tab and type:
window.location.href = "http://google.com"
...where you replace http://google.com with your desired URL. (see How to get browser to navigate to URL in Javascript?)
If you don't want to navigate one of the existing pages, one way I know of is via telling android (via ADB) to open a URL, with the default browser set to Chrome in Android. That should open a new tab. See Need command line to start web browser using adb
Upvotes: 3