在Windows 10更新1903的Jenkins中运行无头自动睡表0.9.21测试时出现问题

时间:2019-08-01 17:04:06

标签: jenkins windows-10 nightwatch

Nightwatch 0.9.21,Seleniun v3.9.1,Chrome webdriver 76.0.3809.68,Jenkins 2.176.1。 在Windows 10更新到1903之后,Jenkins使用slave-client启动了自动测试。 Nightwatch测试开始,但浏览器未加载任何元素以再次运行测试,结果由于未找到测试元素而失败。

试图将硒更新为4.0.0-alpha,但这无法在夜视0.9.21中运行 当从属客户端PC在打开屏幕的情况下登录时,测试运行正常。

nightwatch.json配置:

{
  "src_folders" : ["Tests/tests"],
  "output_folder" : "reports",
  "custom_commands_path" : "Tests/commands",
  "custom_assertions_path" : "Tests/assertions",
  "page_objects_path" : "Tests/pages",
  "globals_path" : "Tests/globals/globals.js",

  "selenium" : {
    "start_process" : true,
    "server_path" : "./lib/selenium-server-standalone-3.9.1.jar",
    "log_path" : "",
    "port" : 4444,
    "cli_args": {
      "webdriver.chrome.driver": "./lib/chromedriver.exe",
      "webdriver.gecko.driver": "./lib/geckodriver-v0.23.0-win64.exe"
    }
  },

  "test_settings" : {
     "default": {
      "launch_url" : "https://mytestend.com",
      "selenium_port": 4444,
      "selenium_host": "localhost",
      "silent": false,
      "end_session_on_fail": false,
      "screenshots": {
      "enabled": true,
      "on_failure": true,
        "path": "screenshots"
      },
      "desiredCapabilities": {
          "browserName": "chrome",
          "loggingPrefs": { "browser": "ALL" },
          "javascriptEnabled": true,
      "acceptSslCerts": true,
      "chromeOptions" : {
        "args" : ["--no-sandbox"]
          }
    },
    "globals": {
      "browser": "chrome",
      "os": "windows",
      "abortOnAssertionFailure": false
    }
  }
}

在Windows 10 Update 1903之前,这些测试运行没有问题。在具有Windows 10 1809版的同一台机器上测试了相同的设置

0 个答案:

没有答案