Cookies webdriverio请求设置cookie';s值无法满足

Cookies webdriverio请求设置cookie';s值无法满足,cookies,webdriver,phantomjs,Cookies,Webdriver,Phantomjs,这是我的代码,我想设置cookie,但我得到如下所示的错误消息 await browser.url(`http://xxx.xxx.com`); await browser.setCookie({ name: 'myCookie', value: '12sdfdsfsdfsfddsf3', domain: 'xxx.xxx.com', path: '/', /* required property */ httponly : true,

这是我的代码,我想设置cookie,但我得到如下所示的错误消息

 await browser.url(`http://xxx.xxx.com`);
 await browser.setCookie({
  name: 'myCookie',
  value: '12sdfdsfsdfsfddsf3',
  domain: 'xxx.xxx.com',
  path: '/',                /* required property */
  httponly : true,
  secure   : false,
  expires  : (new Date()).getTime() + (1000 * 60 * 60)
});
这是错误消息

Unable to set Cookie
running phantomjs
Error: A request to set a cookie's value could not be satisfied.
at cookie("post", [object Object]) - index.js:348:27
at url("http://xxx.xxx.com") - index.js:307:3
这是配置文件

{
 capabilities: [
  {
    browserName: 'phantomjs',
  }
 ],
 exclude: [],
 maxInstances: 2,
 sync: true,
 logLevel: 'error',
 coloredLogs: true,
 waitforTimeout: 20000,
 connectionRetryTimeout: 50000,
 connectionRetryCount: 3,
 screenshotPath: './errorShots/',
 screenshotOnReject: true,
 framework: 'mocha',
 reporters: [costomReport],
 reporterOptions: {
  outputDir: './',
  combined: true
 },
 mochaOpts: {
  ui: 'bdd',
  timeout: 30000,
 }
}
我尝试过使用browser.cookie(“post”,[{…}]),但它也不起作用。
有什么建议吗?

请分享您的phantomjs日志,否则我们无法知道发生了什么,请看这里:这或多或少是phantomjs的问题。你应该考虑升级你的版本。请分享你的幻像日志,否则我们不能知道发生了什么,请看这里:它或多或少是一个幻象问题。你应该考虑把你的版本升级。