Send new URL to Chrome in Android while using Chrome Remote Debugging

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


You can pick one of the pages that are thumbnailed (ie 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

链接地址: http://www.djcxy.com/p/42202.html

上一篇: 当用户点击自动完成的搜索结果时,jquery进入搜索页面?

下一篇: 使用Chrome远程调试时,在Android中将新网址发送到Chrome