Nothing happens after calling .url ()

I have the following night time test:

module.exports = {

    'Set Initial Dataset' : function (browser) {

        browser
          .url('http://localhost/nightwatch/load-initial-dataset')
          .end()

    }

}

When I launch it, the browser opens and the URL loads, but when the download is complete, it does not close the browser to start the next test.

The test worked 1 month ago ... I updated the night arrow to the latest version of nigwwatch (v0.9.8), downloaded selenium-server-standalone-3.0.1.jar, chromedriver 2.25 and Chrome 54.0.2840.87

My nigthwatch.js

module.exports = {

src_folders: ['./tests'],
output_folder: './results',

selenium: {

    start_process: true,
    server_path: './selenium-server-standalone-3.0.1.jar',
    log_path: './results',
    host: '127.0.0.1',
    port: 4444,
    "cli_args" : {
        "webdriver.chrome.driver" : "./osx/chromedriver"
    }

},

test_settings: {

    default: {

        waitForConditionPollInterval: 1,
        selenium_host: '127.0.0.1',
        selenium_port: 4444,
        screenshots: {

            enabled: true,
            path: './results/screenshots'

        },
        desiredCapabilities: {

            browserName: 'chrome',
            javascriptEnabled: true,
            acceptSslCerts: true

        }

    }

}

};

I tried to run this test, and I have the same problem: https://github.com/nightwatchjs/nightwatch/blob/master/examples/tests/google.js (the browser remains open at the URL and nothing from the terminal)

I have no particular problems when I ran my test using safari.

thank

+4
2

, , , "" -. .

, waitForConditionPollInterval . 1 .

, :

  • . , ...

:

module.exports = {
    'Set Initial Dataset' : function (browser) {
    browser
       .url('http://localhost/nightwatch/load-initial-dataset')
       .assert.title('Some Title')
       .end()
    }
}
  1. waitForConditionPollInterval , . , - , , 100 , , .
+1

, , . , .

, , URL-, . - , , URL- . , URL-, .urlContains();.

:

module.exports = {

    'Set Initial Dataset' : function (browser) {

        browser
          .url('http://localhost/nightwatch/load-initial-dataset')
          .verify.urlContains('/load-initial-dataset')
          .end();

    }

}

.end();, , , nightwatch, .

, .

0

Source: https://habr.com/ru/post/1659674/


All Articles