Error while trying to run NodeJS selenium test

38 views
Skip to first unread message

Nicolas Donna

unread,
Sep 6, 2019, 8:49:27 AM9/6/19
to RedLine13
I'm running a simple script with redline13-webdriver and I get the following error on the logs

module.js:550
   
throw err;
   
^

Error: Cannot find module '../build/Release/msg'
    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> (/nodeshare/node_modules/svmq/lib/queue.js:4:7)
    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)


I can share the test code, but here is a rough idea

var redline = require('redline13-webdriver'); //import redline13 library

var driver = redline.loadBrowser('chrome');

var
By = redline.webdriver.By;
var until = redline.webdriver.until;

async function run() {
 try {
   driver.get(`${URL}?forceLogin=1`); //navigate to home

    const usernameBy = By.id(usernameSelector);
   await driver.wait(until.elementLocated(usernameBy));

    const usernameElement = driver.findElement(usernameBy);
   const passwordElement = driver.findElement(By.id(passwordSelector));


   
// More stuff
    driver.quit();
 } catch (e) {
   console.log(e);
   driver.quit();
 }
}

run();


Does anyone know what this could be??

Thanks

Reply all
Reply to author
Forward
0 new messages