Unable to handle location access pop up on firefox using nightwatch.js

不想你离开。 提交于 2020-06-17 22:56:42

问题


While executing selenium tests on firefox using nightwatch.js, the test where our application selects geolocation keeps failing because of a pop-up in firefox asking to allow access keeps blocking the test It works fine on chrome when the configuration is set to

"chromeOptions": {"args": ["--no-sandbox","--disable-infobars"]}

However, the below options for firefox does not seem to work

"firefox": {
      "selenium_port": 1234,
      "desiredCapabilities": {
        "browserName": "firefox",
        "browserVersion": "74.0",
        "javascriptEnabled": true,
        "acceptSslCerts": true,
        "acceptInsecureCerts": true,
        "typeerrorEnabled": true,
        "marionette": true
      },
      "firefoxOptions": {
        "args": [
          "--headless",
          "--no-sandbox",
          "disable-infobars",
          "disable-notifications",
          "use-fake-device-for-media-stream",
          "use-fake-ui-for-media-stream",
          "disable-web-security",
          "--log",
          "debug"
        ],
        "binary" : ".bin/geckodriver"
      }
   }

I would like to know if I am missing anything here, or if you could point me in the correct direction. (Adding an image for more visibility and clarification)

来源:https://stackoverflow.com/questions/62204758/unable-to-handle-location-access-pop-up-on-firefox-using-nightwatch-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!