Oxygen-cli installation and run issues

Greetings.

When installing oxygen-cli via npm, installation finishes with the following errors.

CXX(target) Release/obj.target/odbc_bindings/src/odbc.o
In file included from …/src/odbc.cpp:25:
…/src/odbc.h:30:10: fatal error: ‘sql.h’ file not found
#include <sql.h>
^~~~~~~
1 error generated.
make: *** [Release/obj.target/odbc_bindings/src/odbc.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “configure” “build”
gyp ERR! cwd /usr/local/lib/node_modules/oxygen-cli/node_modules/odbc
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok

In addition, installing the latest version, 0.48.x, will fail tests due to el.waitForDisplayed not being recognized. My tests run fine with 0.47.6.

info: [oxygen] TypeError: el.waitForDisplayed is not a function
    at module.exports.getElement (/usr/local/lib/node_modules/oxygen-cli/ox_modules/utils.js:59:20)
    at module.exports (/usr/local/lib/node_modules/oxygen-cli/ox_modules/module-web/commands/waitForVisible.js:22:18)
    at Object.wrapper.(anonymous function) [as waitForVisible] (/usr/local/lib/node_modules/oxygen-cli/lib/script-boilerplate.js:453:45)
1 Like

That error can be ignored. It just means that DataBase support wasn’t installed. If you need to work with DataBases (db module) - install Windows SDK, then remove oxygen-cli with npm remove -g oxygen-cli and re0install with npm i -g oxygen-cli.

How did you use waitForDisplayed exatly? web.driver().waitForDisplayed() like this? This command was part of WDIO and was not exposed directly for using in the scripts.

I don’t use waitForDisplayed at all. My test just call calls web.waitForVisible(element).
I created and ran a super simple test:

web.init();
web.open(‘https://www.google.com’);
web.waitForVisible(‘input[aria-label=“Search”]’);

In 0.47.4, this will finish with no issues. In 0.48.7, this will return the stack trace:

info: [oxygen] TypeError: el.waitForDisplayed is not a function
at module.exports.getElement (/usr/local/lib/node_modules/oxygen-cli/ox_modules/utils.js:59:20)
at module.exports (/usr/local/lib/node_modules/oxygen-cli/ox_modules/module-web/commands/waitForVisible.js:22:18)
at Object.wrapper.(anonymous function) [as waitForVisible] (/usr/local/lib/node_modules/oxygen-cli/lib/script-boilerplate.js:453:45)
at /Users/aveeveng/Documents/OxygenAutoExp/tests/GoogleTest.js:8:5

It also happens to me differently : in (0.49.0)

CLI output

info: [oxygen] Executing: web.click(“id=login”)
info: [oxygen] Error details:

info: [oxygen] Type: undefined Name: TypeError Code: undefined Msg: el.click is not a function

info: [oxygen] TypeError: el.click is not a function
at module.exports (C:\Users\Mmmmss\AppData\Roaming\npm\node_modules\oxygen-cli\ox_modules\module-web\commands\click.js:27:12)
at Object.wrapper.(anonymous function) [as click] (C:\Users\Mmm\AppData\Roaming\npm\node_modules\oxygen-cli\lib\script-boilerplate.js:453:45)
at Object.loignAgentsSite (C:\Users\Mmm\Documents\Automation\tests\files\roobiUtils.js:29:13)
at C:\Users\Mmmm\Documents\RooBi Automation\tests\delete_automation_users.js:13:12

error: [oxygen] Error occured: undefined: el.click is not a function
info: [oxygen] Executing: mob._iterationEnd()
info: [oxygen] Executing: web._iterationEnd()
info: [oxygen] Executing: web.dispose()
info: [oxygen] Executing: mob._iterationStart()
info: [oxygen] Executing: web._iterationStart()
info: [oxygen] Executing: web.init()
info: [oxygen] Executing: web.setWindowSize(100,1000)
info: [oxygen] Executing: web.open(“https://mmm.co.il/”)
info: [oxygen] Executing: web.click(“id=portfolio”)

@aveeveng @111
What Selenium and ChromeDriver/GeckoDriver/IEDriver version do you guys use?

geckodriver = 0.24.0

IEDriverServer_x86 = 3.141.59.0

chromedriver = 77.0.3865.40

Thanks @romovs .

@romovs
geckodriver: 0.24.0
chromedriver: 76.0.3809.68 and 77.0.3865.40

I was able to reproduce the web.click issue @111 had.

info: [oxygen] Script boilerplate initialization completed
info: [oxygen] Executing: mob._iterationStart()
info: [oxygen] Executing: web._iterationStart()
info: [oxygen] Executing: web.init()
info: [oxygen] Executing: web.open(“https://www.google.com”)
info: [oxygen] Executing: web.click(“input[aria-label=“Search”]”)
info: [oxygen] Error details:

info: [oxygen] Type: undefined Name: TypeError Code: undefined Msg: el.click is not a function

info: [oxygen] TypeError: el.click is not a function
at module.exports (/usr/local/lib/node_modules/oxygen-cli/ox_modules/module-web/commands/click.js:27:12)
at Object.wrapper.(anonymous function) [as click] (/usr/local/lib/node_modules/oxygen-cli/lib/script-boilerplate.js:453:45)
at /Users/andreweng/Documents/OxygenAutoExp/tests/GoogleTest.js:7:5

Should be fixed now in v0.50.1
Please remove oxygen-cli first with npm remove -g oxygen-cli and then reinstall with npm i -g oxygen-cli

1 Like

Working Properly :slight_smile:

Thanks. @romovs .

1 Like

Verified that my tests are running with no issues after installing 0.50.1. Thanks @romovs.

1 Like