Cannot find module 'chromedriver'

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'm newest in Selenium tests. I have some question. I installed Nightwatcher, and this is my config file:




"src_folders": ["/home/project"],
"output_folder": "./reports",
"custom_commands_path": "",
"custom_assertions_path": "",
"page_objects_path": "",
"globals_path": "/home/project/globals.js",

"selenium" :
"start_process" : true,
"server_path" : "/opt/selenium/selenium-server-standalone.jar",
"log_path" : "",
"port" : 4444,
"cli_args" :
"webdriver.chrome.driver" : "./bin/chromedriver"

,

"test_settings" :
"default" :
"selenium_port" : 9515,
"selenium_host" : "localhost",
"default_path_prefix" : "",
"screenshots" :
"enabled" : true,
"path" : "./screen"
,

"desiredCapabilities":
"browserName": "chrome",
"javascriptEnabled": true,
"chromeOptions" :
"args" : ["--no-sandbox", "--headless", "--disable-gpu", "--disable-extensions"]
,
"acceptSslCerts": true






And this is my global.js file:



const chromedriver = require('chromedriver');
module.exports =
before: function(done)
chromedriver.start();
done();
,
after: function(done)
chromedriver.stop();
done();




Chromedriver was downloaded from off site http://chromedriver.chromium.org/downloads and unzip in home_project/bin. But when i try to start test i have err like this:



# nightwatch --test ya.js
There was an error while starting the test runner:

Error reading external global file failed: using /home/project/globals.js:
Error: Cannot find module 'chromedriver'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/project/globals.js:1:84)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)


Any ideas?









share

























    up vote
    0
    down vote

    favorite












    I'm newest in Selenium tests. I have some question. I installed Nightwatcher, and this is my config file:




    "src_folders": ["/home/project"],
    "output_folder": "./reports",
    "custom_commands_path": "",
    "custom_assertions_path": "",
    "page_objects_path": "",
    "globals_path": "/home/project/globals.js",

    "selenium" :
    "start_process" : true,
    "server_path" : "/opt/selenium/selenium-server-standalone.jar",
    "log_path" : "",
    "port" : 4444,
    "cli_args" :
    "webdriver.chrome.driver" : "./bin/chromedriver"

    ,

    "test_settings" :
    "default" :
    "selenium_port" : 9515,
    "selenium_host" : "localhost",
    "default_path_prefix" : "",
    "screenshots" :
    "enabled" : true,
    "path" : "./screen"
    ,

    "desiredCapabilities":
    "browserName": "chrome",
    "javascriptEnabled": true,
    "chromeOptions" :
    "args" : ["--no-sandbox", "--headless", "--disable-gpu", "--disable-extensions"]
    ,
    "acceptSslCerts": true






    And this is my global.js file:



    const chromedriver = require('chromedriver');
    module.exports =
    before: function(done)
    chromedriver.start();
    done();
    ,
    after: function(done)
    chromedriver.stop();
    done();




    Chromedriver was downloaded from off site http://chromedriver.chromium.org/downloads and unzip in home_project/bin. But when i try to start test i have err like this:



    # nightwatch --test ya.js
    There was an error while starting the test runner:

    Error reading external global file failed: using /home/project/globals.js:
    Error: Cannot find module 'chromedriver'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/project/globals.js:1:84)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)


    Any ideas?









    share























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm newest in Selenium tests. I have some question. I installed Nightwatcher, and this is my config file:




      "src_folders": ["/home/project"],
      "output_folder": "./reports",
      "custom_commands_path": "",
      "custom_assertions_path": "",
      "page_objects_path": "",
      "globals_path": "/home/project/globals.js",

      "selenium" :
      "start_process" : true,
      "server_path" : "/opt/selenium/selenium-server-standalone.jar",
      "log_path" : "",
      "port" : 4444,
      "cli_args" :
      "webdriver.chrome.driver" : "./bin/chromedriver"

      ,

      "test_settings" :
      "default" :
      "selenium_port" : 9515,
      "selenium_host" : "localhost",
      "default_path_prefix" : "",
      "screenshots" :
      "enabled" : true,
      "path" : "./screen"
      ,

      "desiredCapabilities":
      "browserName": "chrome",
      "javascriptEnabled": true,
      "chromeOptions" :
      "args" : ["--no-sandbox", "--headless", "--disable-gpu", "--disable-extensions"]
      ,
      "acceptSslCerts": true






      And this is my global.js file:



      const chromedriver = require('chromedriver');
      module.exports =
      before: function(done)
      chromedriver.start();
      done();
      ,
      after: function(done)
      chromedriver.stop();
      done();




      Chromedriver was downloaded from off site http://chromedriver.chromium.org/downloads and unzip in home_project/bin. But when i try to start test i have err like this:



      # nightwatch --test ya.js
      There was an error while starting the test runner:

      Error reading external global file failed: using /home/project/globals.js:
      Error: Cannot find module 'chromedriver'
      at Function.Module._resolveFilename (module.js:548:15)
      at Function.Module._load (module.js:475:25)
      at Module.require (module.js:597:17)
      at require (internal/module.js:11:18)
      at Object.<anonymous> (/home/project/globals.js:1:84)
      at Module._compile (module.js:653:30)
      at Object.Module._extensions..js (module.js:664:10)
      at Module.load (module.js:566:32)
      at tryModuleLoad (module.js:506:12)
      at Function.Module._load (module.js:498:3)


      Any ideas?









      share













      I'm newest in Selenium tests. I have some question. I installed Nightwatcher, and this is my config file:




      "src_folders": ["/home/project"],
      "output_folder": "./reports",
      "custom_commands_path": "",
      "custom_assertions_path": "",
      "page_objects_path": "",
      "globals_path": "/home/project/globals.js",

      "selenium" :
      "start_process" : true,
      "server_path" : "/opt/selenium/selenium-server-standalone.jar",
      "log_path" : "",
      "port" : 4444,
      "cli_args" :
      "webdriver.chrome.driver" : "./bin/chromedriver"

      ,

      "test_settings" :
      "default" :
      "selenium_port" : 9515,
      "selenium_host" : "localhost",
      "default_path_prefix" : "",
      "screenshots" :
      "enabled" : true,
      "path" : "./screen"
      ,

      "desiredCapabilities":
      "browserName": "chrome",
      "javascriptEnabled": true,
      "chromeOptions" :
      "args" : ["--no-sandbox", "--headless", "--disable-gpu", "--disable-extensions"]
      ,
      "acceptSslCerts": true






      And this is my global.js file:



      const chromedriver = require('chromedriver');
      module.exports =
      before: function(done)
      chromedriver.start();
      done();
      ,
      after: function(done)
      chromedriver.stop();
      done();




      Chromedriver was downloaded from off site http://chromedriver.chromium.org/downloads and unzip in home_project/bin. But when i try to start test i have err like this:



      # nightwatch --test ya.js
      There was an error while starting the test runner:

      Error reading external global file failed: using /home/project/globals.js:
      Error: Cannot find module 'chromedriver'
      at Function.Module._resolveFilename (module.js:548:15)
      at Function.Module._load (module.js:475:25)
      at Module.require (module.js:597:17)
      at require (internal/module.js:11:18)
      at Object.<anonymous> (/home/project/globals.js:1:84)
      at Module._compile (module.js:653:30)
      at Object.Module._extensions..js (module.js:664:10)
      at Module.load (module.js:566:32)
      at tryModuleLoad (module.js:506:12)
      at Function.Module._load (module.js:498:3)


      Any ideas?







      selenium





      share












      share










      share



      share










      asked 3 mins ago









      Oleg Kalinin

      83




      83

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475725%2fcannot-find-module-chromedriver%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475725%2fcannot-find-module-chromedriver%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay