Nightwatch using chromedriver version 83 returns `undefined` global values on script
Asked 07 September, 2021
Viewed 2.1K times
  • 58
Votes

Hi to all and this is the first time I'm posting at StackOverflow.

My nightwatch script with a chromedriver version 77 was working before until I've updated to version 83 which throws a string value of undefined from the global variables at nightwatch.conf.js when I used it on my test script.

Here is my nightwatch.conf.js customized environment settings sample configuration;

    "dev" : {
      "product_url" : "https://website.sampledev.com",
      "demo_site" : "fake.site.com",
      "globals" : {
        "email": "[email protected]",
        "password": "FAKEP@ssw0rd"       
      }
    },

Code used: var test_site = browser.demo_site

Inputting the demo_site global variable to the text box of a website. Which I used browser.setValue(`<sample_xpath_here>`,`${test_site}`)

Expected Result: Inside the text box fake.site.com

Actual Result: Inside the text box undefined

1 Answer