Jasmine 当我在Chrome上以无头模式运行时,量角器测试失败

Jasmine 当我在Chrome上以无头模式运行时,量角器测试失败,jasmine,protractor,Jasmine,Protractor,我的量角器测试在chrome浏览器中运行正常,但在无头模式下运行时失败 量角器配置 directConnect: false, capabilities: { browserName: "chrome", chromeOptions: { args: [ "--headless", "--disable-gpu", "--window-size=1920,1080&quo

我的量角器测试在chrome浏览器中运行正常,但在无头模式下运行时失败

量角器配置

  directConnect: false,
  capabilities:
    {
      browserName: "chrome",
      chromeOptions: {
        args: [ "--headless", "--disable-gpu", "--window-size=1920,1080","--no-sandbox" ]
      }
    },
chrome版本:90.0.4430.85 Chrome驱动程序:chromedriver_90.0.4430.24


我的应用程序运行在一个不安全的URL上(即,每次我都有接受安全异常的测试)

您会得到什么样的错误。ClickCloseAutosweepListAlt=function(){element.isPresent()。然后(function(elm){if(elm){element.click()console.log(
…Close button Clicked
)}else{expect(elm).toBe(true)console.log(
…找不到关闭按钮***
)}}/。。。未找到关闭按钮***在终端上显示