0

我正在尝试执行 chrome 无浏览器执行,并在我的配置文件中声明了以下功能:

capabilities[{
browserName: 'chrome',
acceptInsecureCerts: true,
'goog:chromeOptions' : {
   args: [
  '--ignore-certificate-errors',
  '--no-sandbox',
  '--disable-infobars',
  '--headless',
  '--disable-gpu',
  '--window-size=1920,1080',
  '--disable-dev-shm-usage'
],

}
}]

我没有添加任何所需的功能。我得到以下错误:

WARN:webdriver:Request failed due to unhandled request
DEBUG:webdriver:Request failed due to missing body
DATA{
capabilities:{
alwaysmatch:{
browserName: 'chrome',
acceptInsecureCerts: true,
'goog:chromeOptions' : [Object]
},
  firstMatch: [{}]
},
desiredCapabilities:{
browserName: 'chrome',
acceptInsecureCerts: true,
'goog:chromeOptions' : {args: [Array]}
}
}
ERROR:webdriver:Request failed due to Error: unhandled request

有人可以帮忙吗?是否也必须拥有所需的能力?我是否缺少功能上的某些东西,或者错误应该在其他地方?

4

0 回答 0