nightwatchjs / nightwatch

Integrated end-to-end testing framework written in Node.js and using W3C Webdriver API. Developed at @browserstack
https://nightwatchjs.org
MIT License
11.79k stars 1.31k forks source link

Unable to run any simple tests using nightwatch #2654

Closed ravikumar2000 closed 3 years ago

ravikumar2000 commented 3 years ago

Describe the bug

Sample test

sampleTest.js

```js // Please add the sample test here module.exports = { sampleTest: function(browser) { } } ```

Run with command

$ nightwatch test/sampleTest.js --your-other-arguments-here

Verbose output

debug.log

```txt ```

Configuration

nightwatch.json

```js { "your": { "config": "here" } } ```

Your Environment

Executable Version
nightwatch --version VERSION
npm --version VERSION [opc@oci-vm-ravigr nightwatchjs-e2e]$ cat nightwatch.json

{ "src_folders" : ["tests"], "output_folder" : "reports", "custom_commands_path" : "", "custom_assertions_path" : "", "page_objects_path" : "", "globals_path" : "", "test_workers" : {"enabled" : true, "workers" : "auto"}, "selenium" : { "start_process" : true, "server_path" : "node_modules/selenium-server-standalone-jar/jar/selenium-server-standalone-3.10.0.jar", "log_path" : "", "host" : "127.0.0.1", "port" : 4444, "cli_args" : { "webdriver.chrome.driver" : "node_modules/chromedriver/lib/chromedriver/chromedriver", "webdriver.ie.driver" : "" } }, "test_settings" : { "default" : { "launch_url" : "http://localhost", "selenium_port" : 4444, "selenium_host" : "localhost", "silent": true, "firefox_profile": false, "chrome_driver" : "", "screenshots" : { "enabled" : true, "path" : "screenshots", "on_failure": true, "on_error": false }, "desiredCapabilities": { "browserName": "chrome", "javascriptEnabled": true, "acceptSslCerts": true, "chromeOptions": { "args": ["--headless","--window-size=1920,1080"] }, "use_xpath": false } } } } [opc@oci-vm-ravigr nightwatchjs-e2e]$ npx nightwatch tests/google/google.js Starting selenium server... There was an error while starting the Selenium server:

07:55:18.887 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.10.0', revision: '176b4a9' 07:55:18.888 INFO [GridLauncherV3$1.launch] - Launching a standalone Selenium Server on port 4444 2021-04-19 07:55:19.009:INFO::main: Logging initialized @396ms to org.seleniumhq.jetty9.util.log.StdErrLog 07:55:19.176 ERROR [SeleniumServer.boot] - Port 4444 is busy, please choose a free port and specify it using -port option

[opc@oci-vm-ravigr nightwatchjs-e2e]$ cat selenium-debug.log 07:49:30.002 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.10.0', revision: '176b4a9' 07:49:30.004 INFO [GridLauncherV3$1.launch] - Launching a standalone Selenium Server on port 3000 2021-04-19 07:49:30.124:INFO::main: Logging initialized @420ms to org.seleniumhq.jetty9.util.log.StdErrLog 07:49:30.297 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 3000 07:49:30.640 INFO [ActiveSessionFactory.apply] - Capabilities are: Capabilities {acceptSslCerts: true, browserName: chrome, chromeOptions: {args: [--headless, --window-size=1920,1080]}, javascriptEnabled: true, name: Google / Google, use_xpath: false} 07:49:30.641 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService) Starting ChromeDriver 2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926) on port 13370 Only local connections are allowed. Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code. [1618818570.670][SEVERE]: bind() failed: Cannot assign requested address (99) [opc@oci-vm-ravigr nightwatchjs-e2e]$ curl localhost:4444 <!DOCTYPE html>

Selenium  v.

Whoops! The URL specified routes to this help page.

For more information about Selenium please see the docs and/or visit the wiki. Or perhaps you are looking for the Selenium console.

Happy Testing!

Selenium is made possible through the efforts of our open source community, contributions from these people, and our sponsors.
[opc@oci-vm-ravigr nightwatchjs-e2e]$ npm -v 6.12.1 [opc@oci-vm-ravigr nightwatchjs-e2e]$ node -v v12.13.1 **Appreciate for your quick support on this issues.** | `yarn --version` | VERSION | | `node --version` | VERSION | | Browser driver | Version | | --- | --- | | NAME | VERSION | | OS | Version | | --- | --- | | NAME | VERSION |
beatfactor commented 3 years ago

@ravikumar2000 do you think it's possible for you to use the Discussions section for issues like this one in the future?