是否可以自动打开Google Chrome devtools? [英] Is it possible to automatically open Google Chrome devtools?
问题描述
鉴于Selenium 2关闭了devtools窗口,其中包含保存在我的chrome用户配置文件下的仿真器配置文件.有没有一种方法可以使用硒脚本来触发devtools打开?
Given that Selenium 2 closes the devtools window which contains my emulator profile saved under my user profile for chrome. Is there a way to trigger devtools to open using a selenium script?
这是有关devtools窗口关闭问题的信息 https://sites.google.com/a /chromium.org/chromedriver/help/devtools-window-keeps-closing
Here is the info on the devtools window closing issue https://sites.google.com/a/chromium.org/chromedriver/help/devtools-window-keeps-closing
尝试这些Chromium覆盖参数中的一些似乎有点累,只有其中一个似乎有效 http://peter.sh/experiments/chromium-command-line-switches/
I feel a little exhausted trying some of these Chromium override parameters only one of which seems to work http://peter.sh/experiments/chromium-command-line-switches/
有影响的是以下
options.addArguments("user-data-dir=/Path/to/chrome/profile");
如果无法打开开发工具窗口或面板,是否可以初始化模拟器?
If there is no way to open the dev tools window or panel, is there a way to initialize the emulator?
推荐答案
在终端上,键入以下内容-
at the terminal, type the following -
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --auto-open-devtools-for-tabs
这篇关于是否可以自动打开Google Chrome devtools?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!