可重播的实验性chromedriver选项在传递到protractor.conf文件中goog:chromeOptions对象内的args数组中时不起作用。
当我从驱动程序日志中检索日志信息时,字符串仍然被截断。
从Chrome项目源代码中的chromedriver_server.cc文件中,您看到:
if (cmd_line->HasSwitch("h") || cmd_line->HasSwitch("help")) {
std::string options;
const char* const kOptionAndDescriptions[] = {
...............
"log-path=FILE",
"write server log to file instead of stderr, "
"increases log level to INFO",
"log-level=LEVEL",
"set log level: ALL, DEBUG, INFO, WARNING, SEVERE, OFF",
"verbose",
"log verbosely (equivalent to --log-level=ALL)",
"silent",
"log nothing (equivalent to --log-level=OFF)",
"append-log",
"append log file instead of rewriting",
"replayable",
"(experimental) log verbosely and don't truncate long "
"strings so that the log can be replayed.",
"version",
"print the version number and exit",
............
当我尝试在量角器conf文件中设置此选项时,不会发生切换的影响。
这就是我在protractor.conf.js中尝试的
// capabilities
{
browserName: 'chrome',
loggingPrefs: {
browser: 'ALL',
driver: 'ALL',
performance: 'ALL',
},
'goog:chromeOptions': {
args: ['disable-infobars'],
perfLoggingPrefs: {
enableNetwork: true,
},
w3c: false,
},
elementScrollBehavior: 1,
};
这是我检索日志条目的方式:
browser.manage().logs().get('driver')
当我以日志条目为例时,某些属性被截断为“ ...”。对于访问时间较长的URL尤其如此。