mercredi 5 juillet 2017

Nightwatch JS. Chrome closed after launch, config problems

On my local machine installed Chrome v. 54, it is support chromedriver v. 2.27 But when I launch tests, chrome closed immediately after launch. I thunk, it is a config problem.

This is my nightwatch.json file

    {
        "src_folders" : ["tests"],
    "output_folder" : "reports",
    "custom_commands_path" : "",
    "custom_assertions_path" : "",
    "page_objects_path" : "",
    "globals_path" : "global.js",

    "selenium" : {
    "start_process" : false,
  "server_path" : "./bin/selenium-server-standalone-3.3.1.jar",
  "log_path" : "",
  "port" : 4444,
  "cli_args" : {
   "webdriver.chrome.driver" : "./bin/chromedriver"
  }
 },
 "test_settings" : {
        "default" : {
            "launch_url" : "https://www.site.ru",
            "selenium_port"  : 9515,
            "selenium_host"  : "localhost",
            "default_path_prefix" : "",
            "silent": true,
            "screenshots" : {
                "enabled" : false
            },
            "desiredCapabilities" : {
                "browserName" : "chrome",
                "javascriptEnabled" : true,
                "acceptSslCerts" : true,
                "chromeOptions" : {
                    "args" : ["start-fullscreen"]
                }
            }   
        },
                "chrome" : {
            "desiredCapabilities": {
                "browserName": "chrome",
                "javascriptEnabled" : true,
                "acceptSslCerts" : true,
                "chromeOptions" : {
                    "args" : ["start-fullscreen"]
            }
        }
        }
 }
}

and this is my package.json file

    {
  "name": "test_js",
  "version": "1.0.0",
  "description": "",
  "main": "hello.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "nightwatch": "./node_modules/.bin/nightwatch",
    "lint": "eslint ./src ./functions ./selectors ./data"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "babel-eslint": "^7.1.1",
    "chromedriver": "^2.2",
    "eslint": "^3.18.0",
    "nightwatch": "^0.9.13",
    "selenium-server-standalone-jar": "^3.0.1"
  }
}

What`s wrong?

Aucun commentaire:

Enregistrer un commentaire