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.78k stars 1.31k forks source link

uploadFile not working on Bamboo CI when you run Nightwatch against a folder that contains test files #3453

Closed chriscuba23 closed 1 year ago

chriscuba23 commented 1 year ago

Description of the bug/issue

When I run a test folder on CI that has a test file that has the new uploadFile() function in it I expect the command to run with no errors. Instead at runtime I get the following error and test is being terminated

SyntaxError: Unexpected token / in JSON at position 0

Steps to reproduce

Since its not a nightwatch code issue rather than integration with Bamboo CI I will add the appropriate code to run in a later step

But first you have to create this folder tree

/tests/parallel/parallel1/par1.js /tests/parallel/parallel1/par2.js

don't worry about the path below since the test fails way before that

Sample test

// this will be in par1.js and par2.js

var downloadsFolder = require('downloads-folder');
const DOWNLOADS = downloadsFolder() // Get the local downloads folder, for all major platforms.
const PHOTO_PATH = DOWNLOADS + '//mt_files//mtphoto.png'

let photodomain = 'ahem.email'

module.exports = {

  tags: ['photo1'], '@disabled': false,

  'Navigate to MT': function (browser) {

    browser
      .url('https://www.marinetraffic.com/')
      .click('.qc-cmp2-summary-buttons > :nth-child(2)')
      .waitForElementNotPresent('.qc-cmp2-summary-buttons > :nth-child(2)')
  },

  'User login': function (browser) {

    browser
      .forceClick('button[auth="login"]') //click log in button
      .waitForElementVisible('#email')
      .sendKeys('#email', this.tags + '@' + photodomain) // type in the email
      .waitForElementVisible('#password')
      .sendKeys('#password', this.tags + '@' + photodomain) //type in the password
      .waitForElementVisible('#login_form_submit') // wait for LOGIN button to be visible
      .click('#login_form_submit') //click LOGIN button
      .waitForElementVisible('button#user-logggin') // wait for logged-in user profile icon to be visible

  },

  'Navigate to My Account > Photos Uploaded > Upload a Photo': function (browser) {

    browser
      .url('https://www.marinetraffic.com/en/photos/upload') //navigate to MT Photo Upload page
      .execute('scrollTo(0,400)') // scroll down the page by 400 pixel vertical 
      .waitForElementVisible('span.input-group-btn') // wait until Browse button is visible

  },

  'Upload a single photo': function (browser) {

    browser
      .waitForElementPresent('.btn-file input[type="file"]') // wait for browse photo element to be present in DOM
      .uploadFile('.btn-file input[type="file"]', PHOTO_PATH) // Select Image file to upload from path (Minimum size 800x600 pixels)
      .pause(5000)

  },

  after: function (browser) {
    ['chrome', 'MicrosoftEdge'].includes(browser.options.desiredCapabilities.browserName) ? browser.closeWindow().end() : browser.end(); // if browser is not Chromium based execute .end() only
  }
};

Command to run

`node nightwatch ./tests/parallel/parallel1/ -e selenium.chrome -o xml_results`

or

`node nightwatch ./tests/parallel/ -e selenium.chrome -o xml_results`

running against the following full path with the js file included passes successfully

`node nightwatch ./tests/parallel/parallel1/par1.js -e selenium.chrome -o xml_results`

Verbose Output

build   25-Oct-2022 14:25:04     Running:  selenium.chrome: par1.js 
build   25-Oct-2022 14:25:04     Running:  selenium.chrome: par2.js 
error   25-Oct-2022 14:25:06      Error
error   25-Oct-2022 14:25:06       uncaughtException: Unexpected token / in JSON at position 0
error   25-Oct-2022 14:25:06    SyntaxError: Unexpected token / in JSON at position 0
error   25-Oct-2022 14:25:06        at parse (<anonymous>)
error   25-Oct-2022 14:25:06        at parseChannelMessages (node:internal/child_process/serialization:120:15)
error   25-Oct-2022 14:25:06        at parseChannelMessages.next (<anonymous>)
error   25-Oct-2022 14:25:06        at Pipe.channel.onread (node:internal/child_process:609:18)
build   25-Oct-2022 14:25:06    
build   25-Oct-2022 14:25:06    ───────────────────────────────────────────────────────────────────────────────────────────────────
build   25-Oct-2022 14:25:06    
build   25-Oct-2022 14:25:06      ️TEST FAILURE (1.662s): 
build   25-Oct-2022 14:25:06       - 1 error during execution; 
build   25-Oct-2022 14:25:06       - 0 tests failed; 
build   25-Oct-2022 14:25:06       - 0/NA tests passed

Nightwatch Configuration

// Autogenerated by Nightwatch
// Refer to the online docs for more details: https://nightwatchjs.org/gettingstarted/configuration/
const Services = {}; loadServices();

require('dotenv').config();

const FAILURES_ERRORS_PATH = "./failures"; // Location of the screenshots taken on failures/errors
const REPORTS = "./reports"; // The location where the JUnit XML report files will be saved.

module.exports = {
  // An array of folders (excluding subfolders) where your tests are located;
  // if this is not specified, the test source must be passed as the second argument to the test runner.
  src_folders: ["Scenarios"],

  // See https://nightwatchjs.org/guide/working-with-page-objects/
  page_objects_path: "pages",

  // See https://nightwatchjs.org/guide/extending-nightwatch/#writing-custom-commands
  custom_commands_path: ["./custom_commands", "./node_modules/nightwatch-xhr/es5/commands", "./node_modules/nightwatch-mixpanel/es5/commands", "./node_modules/nightwatch-vrt/commands"],

  // See https://nightwatchjs.org/guide/extending-nightwatch/#writing-custom-assertions
  custom_assertions_path: ["./custom_assertions", "./node_modules/nightwatch-xhr/es5/assertions", "./node_modules/nightwatch-mixpanel/es5/assertions", "node_modules/nightwatch-vrt/assertions"],

  // See https://nightwatchjs.org/guide/#external-globals
  globals_path: "./globals.js",

  data_path: "data",
  output_folder: REPORTS, // The location where the JUnit XML report files will be saved.
  live_output: false, // Whether or not to buffer the output in case of parallel running
  detailed_output: true, // By default detailed assertion output is displayed while the test is running. Set this to `false` if you'd like to only see the test case name displayed and pass/fail status. Detailed output is disabled by default when running tests in parallel.
  //parallel_process_delay: 1000, // Specifies the delay (in milliseconds) between starting the child processes when running in parallel mode.

  webdriver: {

    "keep_alive": true // Enable HTTP Keep-Alive. If set to true the keepAlive option is enabled with default settings (keepAliveMsecs = 3000). If set to an object, can specify specify the keepAliveMsecs value.

  },

  // This object contains all the test related options.

  test_settings: {
    default: {
      disable_error_log: false, // Set this to true if you'd like to not display errors during the execution of the test (they are shown at the end always).
      launch_url: "http://localhost", // A url which can be used later in the tests as the main url to load. Can be useful if your tests will run on different environments, each one with a different url.
      silent: true, // Whether to show the extended HTTP traffic command logs from the WebDriver or Selenium server.
      use_xpath: false, //  Use xpath as the default locator strategy
      test_workers: { "enabled": true, "workers": 24 }, // Whether or not to run individual test files in parallel. If set to `true`, runs the tests in parallel and determines the number of workers automatically. If set to an object, can specify specify the number of workers as `"auto"` or a `number`. 
      globals: require('./globals'), // An object which will be made available within the test and can be overwritten per environment
      screenshots: {
        enabled: true,
        path: FAILURES_ERRORS_PATH,
        on_failure: true
      },

      desiredCapabilities: { // An object which will be passed to the Selenium WebDriver when a new session will be created. You can specify browser name for instance along with other capabilities. 
        browserName: 'chrome',
        javascriptEnabled: true,
        acceptSslCerts: true,
        browserTag: "mttestcr"
      },
      end_session_on_fail: true, // End the session automatically when the test is being terminated, usually after a failed assertion.
      skip_testcases_on_fail: true, // Skip the remaining testcases (or test steps) from the same test suite (i.e. test file), when one testcase fails.
      detailed_output: true, // By default detailed assertion output is displayed while the test is running. Set this to `false` if you'd like to only see the test case name displayed and pass/fail status. This is especially useful when running tests in parallel.

      webdriver: {
        start_process: true, // When this is enabled, the Webdriver server is run in background in a child process and started/stopped automatically. Nightwatch includes support for managing Chromedriver, Geckodriver (Firefox), Safaridriver, and Selenium Server. Please refer to the Install Webdriver section for details.
        server_path: (Services.chromedriver ? Services.chromedriver.path : '') // Only useful if start_process is enabled.
      },

    },

    firefox: {
      desiredCapabilities: {
        browserName: 'firefox',
        alwaysMatch: {
          acceptInsecureCerts: true,
          'moz:firefoxOptions': {
            args: [
              // '-verbose'
              '--window-size=1920,925',
              '--no-sandbox',
            ]
          }
        },
      },
      browserTag: "mttestff",
      webdriver: {
        start_process: true,
        port: 4444,
        server_path: (Services.geckodriver ? Services.geckodriver.path : ''),
        cli_args: [
          // very verbose geckodriver logs
          // '-vv'

        ]
      },

    },

    h_firefox: {
      desiredCapabilities: {
        browserName: 'firefox',
        alwaysMatch: {
          acceptInsecureCerts: true,
          'moz:firefoxOptions': {
            args: [
              '--headless',
              // '-verbose'
              '--window-size=1920,925',
              '--no-sandbox',
            ]
          }
        },
      },
      browserTag: "mttestff",
      webdriver: {
        start_process: true,
        port: 4444,
        server_path: (Services.geckodriver ? Services.geckodriver.path : ''),
        cli_args: [
          // very verbose geckodriver logs
          // '-vv'

        ]
      },

    },

    chrome: {
      desiredCapabilities: {
        browserName: 'chrome',
        loggingPrefs: {
          browser: "ALL"
        },
        javascriptEnabled: true,
        acceptSslCerts: true,
        'goog:chromeOptions': {
          // More info on Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/
          //
          // This tells Chromedriver to run using the legacy JSONWire protocol (not required in Chrome 78)
          w3c: false,
          args: [
            '--no-sandbox',
            //'--ignore-certificate-errors',
            //'--allow-insecure-localhost',
            '--disable-software-rasterizer',
            '--disable-gpu',
            '--window-size=1920,925',
            '--log-level=3',
            '--disable-logging'

          ],
          prefs: {
            "profile.default_content_setting_values.cookies": 1, // Allow sites to save and read cookie data (recommended): 2=Blocked, 1=Allow
          },
        }
      },

      webdriver: {
        start_process: true,
        port: 9515,
        server_path: (Services.chromedriver ? Services.chromedriver.path : ''),
        cli_args: [
          // --verbose
        ]
      },

    },

    h_chrome: {
      desiredCapabilities: {
        browserName: 'chrome',
        loggingPrefs: {
          browser: "ALL"
        },
        javascriptEnabled: true,
        acceptSslCerts: true,
        'goog:chromeOptions': {
          // More info on Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/
          //
          // This tells Chromedriver to run using the legacy JSONWire protocol (not required in Chrome 78)
          w3c: false,
          args: [
            '--no-sandbox',
            '--ignore-certificate-errors',
            '--allow-insecure-localhost',
            '--headless',
            '--disable-gpu',
            '--disable-software-rasterizer',
            //'--verbose',
            '--window-size=1920,925',
            '--log-level=3',
            '--disable-logging'

          ],
          prefs: {
            "profile.default_content_setting_values.cookies": 1, // Allow sites to save and read cookie data (recommended): 2=Blocked, 1=Allow
          },
        },

      },

      webdriver: {
        start_process: true,
        port: 9515,
        server_path: (Services.chromedriver ? Services.chromedriver.path : ''),
        cli_args: [
          // --verbose
        ]
      },

    },

    edge: {
      desiredCapabilities: {
        browserName: 'MicrosoftEdge',
        acceptSslCerts: true,
        'ms:edgeOptions': {
          w3c: false,
          // More info on EdgeDriver: https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/capabilities-edge-options
          args: [
          ]
        },
        browserTag: "mtteste"
      },

      webdriver: {
        start_process: true,
        // Download msedgedriver from https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/
        //  and set the location below:
        server_path: "C:\\Windows\\System32\\msedgedriver.exe",
        cli_args: [
          // --verbose

        ]
      },

    },

    h_edge: {
      desiredCapabilities: {
        browserName: 'MicrosoftEdge',
        'ms:edgeOptions': {
          w3c: false,
          // More info on EdgeDriver: https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/capabilities-edge-options
          args: [
            '--no-sandbox',
            //'--ignore-certificate-errors',
            //'--allow-insecure-localhost',
            '--headless',
            '--window-size=1920,925',
            '--log-level=3',
            '--disable-gpu',
            '--disable-software-rasterizer',
          ]
        },
        browserTag: "mtteste"
      },

      webdriver: {
        start_process: true,
        // Download msedgedriver from https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/
        //  and set the location below:
        server_path: "C:\\Windows\\System32\\msedgedriver.exe",
        cli_args: [
          // --verbose
        ]
      },

    },

    safari: {
      test_workers: { "enabled": false },
      desiredCapabilities: {
        acceptInsecureCerts: false,
        browserName: 'safari',
        browserTag: "mttests",
      },
      webdriver: {
        port: 4445,
        start_process: true,
        server_path: '/usr/bin/safaridriver'
      }
    },

    //////////////////////////////////////////////////////////////////////////////////
    // Configuration for when using the Selenium service, either locally or remote,  |
    //  like Selenium Grid                                                           |
    //////////////////////////////////////////////////////////////////////////////////
    selenium_server: {
      // Selenium Server is running locally and is managed by Nightwatch
      selenium: {
        start_process: false,
        host: '127.0.0.1',
        port: 4444,
        launch_url: 'http://localhost',
        server_path: (Services.seleniumServer ? Services.seleniumServer.path : ''),
        screenshots: {
          enabled: true,
          path: FAILURES_ERRORS_PATH,
          on_failure: true
        },
        cli_args: {
          'webdriver.gecko.driver': (Services.geckodriver ? Services.geckodriver.path : ''),
          'webdriver.chrome.driver': (Services.chromedriver ? Services.chromedriver.path : '')
        }
      }
    },

    'selenium.chrome': {
      extends: 'selenium_server',
      desiredCapabilities: {
        browserName: 'chrome',
        javascriptEnabled: true,
        acceptSslCerts: true,
        acceptInsecureCerts: true,
        chromeOptions: {
          w3c: false,
          args: [
            '--no-sandbox',
            '--ignore-certificate-errors',
            '--allow-insecure-localhost',
            '--headless',
            '--disable-gpu',
            '--disable-software-rasterizer',
            //'--verbose',
            '--window-size=1920,925',
            '--log-level=3',
            '--disable-logging'

          ]
        }
      },
      webdriver: {
        start_process: false,
      }

    },

    'selenium.firefox': {
      extends: 'selenium_server',
      desiredCapabilities: {
        browserName: 'firefox',
        'moz:firefoxOptions': {
          args: [
            '-headless',
            // '-verbose'
          ]
        }
      }
    }
  }
};

function loadServices() {
  try {
    Services.seleniumServer = require('selenium-server');
  } catch (err) { }

  try {
    Services.chromedriver = require('chromedriver');
  } catch (err) { }

  try {
    Services.geckodriver = require('geckodriver');
  } catch (err) { }
}

Nightwatch.js Version

2.3.9

Node Version

16.13.2

Browser

Chrome 103.0.5060.53

Operating System

CentOS Linux 7

Additional Information

tests run on Selenium Grid with the same OS as above

AutomatedTester commented 1 year ago

Just for clarification, does this work locally for you?

And, since nodejs stacks are generally unhelpful, how do you know that the error is coming from /upload command?

chriscuba23 commented 1 year ago

Good morning! Yes it works locally (using Windows). I know that the error comes from the /upload command because I just skipped the test or commented the line that had the upload command and I did not get this failure as I describe above. Would a video of the actions and/or the log file of Bamboo be more helpful?

AutomatedTester commented 1 year ago

Could you please add verbose logging please, that will help a lot!

chriscuba23 commented 1 year ago

@AutomatedTester sadly you wont get any more info with that, but here it goes

build   02-Nov-2022 12:21:40    Running e2e tests on Selenium grid
build   02-Nov-2022 12:21:40    Launching up to 20 concurrent test worker processes...
build   02-Nov-2022 12:21:40    
build   02-Nov-2022 12:21:41    Started child process for:  Scenarios/par1.js 
build   02-Nov-2022 12:21:41    Started child process for:  Scenarios/par2.js 
error   02-Nov-2022 12:21:43      → Error
error   02-Nov-2022 12:21:43    
error   02-Nov-2022 12:21:43        uncaughtException: Unexpected token / in JSON at position 0
error   02-Nov-2022 12:21:43    SyntaxError: Unexpected token / in JSON at position 0
error   02-Nov-2022 12:21:43        at parse (<anonymous>)
error   02-Nov-2022 12:21:43        at parseChannelMessages (node:internal/child_process/serialization:120:15)
error   02-Nov-2022 12:21:43        at parseChannelMessages.next (<anonymous>)
error   02-Nov-2022 12:21:43        at Pipe.channel.onread (node:internal/child_process:609:18)
build   02-Nov-2022 12:21:43    
build   02-Nov-2022 12:21:43    ───────────────────────────────────────────────────────────────────────────────────────────────────
build   02-Nov-2022 12:21:43    
build   02-Nov-2022 12:21:43      TEST FAILURE (2.772s): 
build   02-Nov-2022 12:21:43       - 1 error during execution; 
build   02-Nov-2022 12:21:43       - 0 tests failed; 
build   02-Nov-2022 12:21:43       - 0/NA tests passed

I can run the single file test if you want where I target the js file and not the folder that contains it though. Would running this with verbose be of any help?

prudhvi22 commented 1 year ago

Update

I have tried to reproduce the error on mac OS but not able to reproduce it. I have created a Github repo for test files. https://github.com/prudhvi22/nightwatch-bamboo-issue. I will try on CentOS Linux 7.

Output


build   08-Nov-2022 20:03:44    > nightwatch "--env" "selenium.chrome"
build   08-Nov-2022 20:03:44    
build   08-Nov-2022 20:03:44     Running:  selenium.chrome: par1.js 
build   08-Nov-2022 20:03:44     Running:  selenium.chrome: par2.js 
build   08-Nov-2022 20:04:14    
build   08-Nov-2022 20:04:14    ┌ ────────────────── ✔  selenium.chrome: par2.js  ─────────────────────────────┐│                                                                              ││   selenium.chrome: par2.js                                                   ││   selenium.chrome: par2.js  [Par2] Test Suite                                ││   selenium.chrome: par2.js  ──────────────────────────────────               ││   selenium.chrome: par2.js  Using: chrome (103.0.5060.53) on MAC OS X.       ││   selenium.chrome: par2.js  – Navigate to MT                                 ││   selenium.chrome: par2.js  - Loading url: https://www.marinetraffic.com/    ││   selenium.chrome: par2.js  ℹ Loaded url https://www.marinetraffic.com/ in   ││   1099ms                                                                     ││   selenium.chrome: par2.js  ✔ Element <.qc-cmp2-summary-buttons >            ││   :nth-child(2)> was not present after 11 milliseconds.                      ││   selenium.chrome: par2.js  ✔ selenium.chrome: par2.js [Par2] Navigate to    ││   MT (4.025s)                                                                ││   selenium.chrome: par2.js                                                   ││   selenium.chrome: par2.js   – User login                                    ││   selenium.chrome: par2.js  ✔ Element <#email> was visible after 533         ││   milliseconds.                                                              ││   selenium.chrome: par2.js  ✔ Element <#password> was visible after 15       ││   milliseconds.                                                              ││   selenium.chrome: par2.js  ✔ Element <#login_form_submit> was visible       ││   after 12 milliseconds.                                                     ││   selenium.chrome: par2.js  ✔ Element <button#user-logggin> was visible      ││   after 2833 milliseconds.                                                   ││   selenium.chrome: par2.js  ✔ selenium.chrome: par2.js [Par2] User login     ││   (3.64s)                                                                    ││   selenium.chrome: par2.js  – Navigate to My Account > Photos Uploaded >     ││   Upload a Photo                                                             ││   selenium.chrome: par2.js  - Loading url:                                   ││   https://www.marinetraffic.com/en/photos/upload                             ││   selenium.chrome: par2.js  ℹ Loaded url                                     ││   https://www.marinetraffic.com/en/photos/upload in 16837ms                  ││   selenium.chrome: par2.js  ✔ Element <span.input-group-btn> was visible     ││   after 15 milliseconds.                                                     ││   selenium.chrome: par2.js  ✔ selenium.chrome: par2.js [Par2] Navigate to    ││   My Account > Photos Uploaded > Upload a Photo (16.858s)                    ││   selenium.chrome: par2.js                                                   ││   selenium.chrome: par2.js  – Upload a single photo                          ││   selenium.chrome: par2.js  ✔ Element <.btn-file input[type="file"]> was     ││   present after 7 milliseconds.                                              ││   selenium.chrome: par2.js  ✔ selenium.chrome: par2.js [Par2] Upload a       ││   single photo (5.027s)                                                      ││                                                                              │└──────────────────────────────────────────────────────────────────────────────┘
build   08-Nov-2022 20:04:21    
build   08-Nov-2022 20:04:21    ┌ ────────────────── ✔  selenium.chrome: par1.js  ─────────────────────────────┐│                                                                              ││   selenium.chrome: par1.js  [Par1] Test Suite                                ││   selenium.chrome: par1.js  ──────────────────────────────────               ││   selenium.chrome: par1.js  Using: chrome (103.0.5060.53) on MAC OS X.       ││   selenium.chrome: par1.js  – Navigate to MT                                 ││   selenium.chrome: par1.js  - Loading url: https://www.marinetraffic.com/    ││   selenium.chrome: par1.js  ℹ Loaded url https://www.marinetraffic.com/ in   ││   9536ms                                                                     ││   selenium.chrome: par1.js  ✔ Element <.qc-cmp2-summary-buttons >            ││   :nth-child(2)> was not present after 4 milliseconds.                       ││   selenium.chrome: par1.js  ✔ selenium.chrome: par1.js [Par1] Navigate to    ││   MT (9.662s)                                                                ││   selenium.chrome: par1.js                                                   ││   selenium.chrome: par1.js  – User login                                     ││   selenium.chrome: par1.js  ✔ Element <#email> was visible after 9173        ││   milliseconds.                                                              ││   selenium.chrome: par1.js  ✔ Element <#password> was visible after 13       ││   milliseconds.                                                              ││   selenium.chrome: par1.js  ✔ Element <#login_form_submit> was visible       ││   after 11 milliseconds.                                                     ││   selenium.chrome: par1.js  ✔ Element <button#user-logggin> was visible      ││   after 2750 milliseconds.                                                   ││   selenium.chrome: par1.js  ✔ selenium.chrome: par1.js [Par1] User login     ││   (12.131s)                                                                  ││   selenium.chrome: par1.js                                                   ││   selenium.chrome: par1.js  – Navigate to My Account > Photos Uploaded >     ││   Upload a Photo                                                             ││   selenium.chrome: par1.js  - Loading url:                                   ││   https://www.marinetraffic.com/en/photos/upload                             ││   selenium.chrome: par1.js  ℹ Loaded url                                     ││   https://www.marinetraffic.com/en/photos/upload in 10047ms                  ││   selenium.chrome: par1.js  ✔ Element <span.input-group-btn> was visible     ││   after 21 milliseconds.                                                     ││   selenium.chrome: par1.js  ✔ selenium.chrome: par1.js [Par1] Navigate to    ││   My Account > Photos Uploaded > Upload a Photo (10.076s)                    ││   selenium.chrome: par1.js  – Upload a single photo                          ││   selenium.chrome: par1.js  ✔ Element <.btn-file input[type="file"]> was     ││   present after 7 milliseconds.                                              ││   selenium.chrome: par1.js  ✔ selenium.chrome: par1.js [Par1] Upload a       ││   single photo (5.036s)                                                      ││                                                                              │└──────────────────────────────────────────────────────────────────────────────┘
build   08-Nov-2022 20:04:21    
build   08-Nov-2022 20:04:21      ✨ PASSED. 14 total assertions (37.57s)
build   08-Nov-2022 20:04:22     Wrote HTML report file to: /Users/prudhvi/work/nightwatch-bamboo/local-working-dir/NIG-BAM-JOB1/reports/nightwatch-html-report/index.html
build   08-Nov-2022 20:04:22    
simple  08-Nov-2022 20:04:22    Finished task 'test' with result: Success
simple  08-Nov-2022 20:04:22    Running post build plugin 'Artifact Copier'
simple  08-Nov-2022 20:04:22    Running post build plugin 'npm Cache Cleanup'
simple  08-Nov-2022 20:04:22    Running post build plugin 'NCover Results Collector'
simple  08-Nov-2022 20:04:22    Running post build plugin 'Build Results Label Collector'
simple  08-Nov-2022 20:04:22    Running post build plugin 'Clover Results Collector'
simple  08-Nov-2022 20:04:22    Running post build plugin 'Docker Container Cleanup'
simple  08-Nov-2022 20:04:22    Finalising the build...
simple  08-Nov-2022 20:04:22    Stopping timer.
simple  08-Nov-2022 20:04:22    Build NIG-BAM-JOB1-25 completed.
simple  08-Nov-2022 20:04:22    Running on server: post build plugin 'Build Hanging Detection Configuration'
simple  08-Nov-2022 20:04:22    Running on server: post build plugin 'NCover Results Collector'
simple  08-Nov-2022 20:04:22    Running on server: post build plugin 'Build Labeller'
simple  08-Nov-2022 20:04:22    Running on server: post build plugin 'Clover Delta Calculator'
simple  08-Nov-2022 20:04:22    Running on server: post build plugin 'Maven Dependencies Postprocessor'
simple  08-Nov-2022 20:04:22    All post build plugins have finished
simple  08-Nov-2022 20:04:22    Generating build results summary...
simple  08-Nov-2022 20:04:22    Saving build results to disk...
simple  08-Nov-2022 20:04:22    Store variable context...
simple  08-Nov-2022 20:04:22    Finished building NIG-BAM-JOB1-25.```
chriscuba23 commented 1 year ago

Hello @prudhvi22 and thank you for the response. What is your Selenium Grid configuration and what does your folder tree look like? Unfortunately I cannot view your folder in Github to check the repo for the test files

prudhvi22 commented 1 year ago

Hello @chriscuba23 and thank you for the response. The folder tree structure is :

/test/parallel/parallel1/par1.js /test/parallel/parallel1/par2.js

I am using the same nightwatch.conf.js as provided.

Nightwatch.js Version 2.3.9

Node Version 16.13.2

Browser Chrome 103.0.5060.53

You can view folder structure here https://github.com/prudhvi22/nightwatch-bamboo-issue

chriscuba23 commented 1 year ago

image thank you for the response @prudhvi22 let me try again then

chriscuba23 commented 1 year ago

Failed again.. Perhaps you should try reproducing it on the exact setup. Would you like to have a chat over at Discord? image

chriscuba23 commented 1 year ago

@prudhvi22 found the culprit. It was the https://www.npmjs.com/package/downloads-folder package I guess it cannot sync with the new Nightwatch on *nix As an alternative whoever uses this package along with Nightwatch has to do it the hard way, which means to create a string of the path rather that expecting the package to find it for him

AutomatedTester commented 1 year ago

Thanks for helping find the issue. It looks like on *nix, you need to do special things according to that package anyway and we can't fix that. I am glad that you found a workaround. Closing this issue as there is nothing for us to action here.

chriscuba23 commented 1 year ago

thanx @AutomatedTester . Close it yes

chriscuba23 commented 1 year ago

@AutomatedTester fyi an update of the package did the trick