Selenium: [QUESTION] Status of "selenium-webdriver" npm package?

Created on 11 Sep 2018  ·  21Comments  ·  Source: SeleniumHQ/selenium

Hello,

I already asked this question in the #6340. I was then advised to post this question to the google-groups forum, where it has been left unanswered: https://groups.google.com/forum/#!topic/selenium-users/NZ9Qsp5as9w

It seems the google-groups is not monitored by the developers, so I'm repeating the question here again.

What is the status of "selenium-webdriver" package on npm? Its "4.0.0-alpha1" released 8 months ago. Is it still maintained? Which java binaries release it supports (latest is v3.14.0)?

If the package is not maintained anymore, it should be noted somewhere in the docs.

Thanks, Nickolay

C-nodejs

Most helpful comment

@jleyba I see. Are you the only maintainer? A project like this one, official javascript bindings for selenium, should have more people behind it.. I'm willing to contribute, any particular blockers or issues to solve before the 4.0.0-final?

If I'm correct, the development repo has advanced forward in the past 8 months, perhaps you can just shoot out the alpha-2 with the current sources state?

All 21 comments

I've been swamped with other responsibilities and haven't had time to work on Selenium in a good while (I do skim the issue list a few times a week even if I'm not commenting on anything).

I'm committed to getting a final 4.0 out the door this year, _hopefully_ roughly in sync with the rest of the project.

@jleyba I see. Are you the only maintainer? A project like this one, official javascript bindings for selenium, should have more people behind it.. I'm willing to contribute, any particular blockers or issues to solve before the 4.0.0-final?

If I'm correct, the development repo has advanced forward in the past 8 months, perhaps you can just shoot out the alpha-2 with the current sources state?

@jleyba Could you maybe provide information on how to correctly build the npm package? That would allow me to test introduced changes on master in my project. If I try to just link the selenium-webdriver directory it will fail with Error: Failed to import atoms modules. If running in devmode, you need to run ./go node:atoms from the project root and running ./go node:atoms from the selenium root just states Don't know how to build task 'node:atom'. Any help would be appreciated, thanks! Running ./go node:atoms works just fine. Sorry for the noise.

It's been nearly a year since 4.0.0 alpha 1 is out and certainly more than a third into 2019, what is holding the package from moving forward with its version? Thanks!

Agree with the idea of putting out an alpha-2 just to get things up to date, I'm willing to contribute if it'll help.

Just in case someone needs an up-to-date version, feel free to use webexts/selenium#nodejs as dependency, I'll keep the fork around until this issue is resolved.

Thanks @stoically, useful to have the option.

@jleyba do you need a hand with anything with regards to getting a new version out of the door? Sounds like there's a few of us on this issue who are keen to help.

Just a note (hope it's appropriate here, @jleyba if there's anything I/we can do to help, I'd be glad to):

Since chromedriver v75 (the npm wrapper for which was released 3 days ago), setting options with .setChromeOptions() doesn't work anymore (see https://github.com/SeleniumHQ/selenium/issues/7289#issuecomment-501720705). The fix has already been applied (https://github.com/SeleniumHQ/selenium/commit/4c8646cde1dcebbf2665b676aa5ce010c6598dce), but has not yet been published to npm.

This might cause some strange bugs for those who weren't expecting it, and adds some urgency to releasing a new version (even if it would only be a new alpha version).

I've just published 4.0.0-alpha.2 of the JS bindings.

Thanks @tourdedave, really appreciate you taking the time to do this!

I've updated my project to use alpha.2 and I'm getting

{ Error: Cannot find module '../../../../bazel-genfiles/javascript/node/selenium-webdriver/lib/atoms/get-attribute.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15) at Function.Module._load (internal/modules/cjs/loader.js:508:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at requireAtom (/Users/jimtrenowden/Documents/GitHub/cerberus/node_modules/selenium-webdriver/lib/http.js:53:14) at Object.<anonymous> (/Users/jimtrenowden/Documents/GitHub/cerberus/node_modules/selenium-webdriver/lib/http.js:35:22) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object.<anonymous> (/Users/jimtrenowden/Documents/GitHub/cerberus/node_modules/selenium-webdriver/http/index.js:29:17) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) code: 'MODULE_NOT_FOUND' } Error: Failed to import atoms module ./atoms/get-attribute.js. If running in dev mode, you need to runbazel build //javascript/node/selenium-webdriver/lib/atoms:get-attribute.jsfrom the projectroot: Error: Cannot find module './atoms/get-attribute.js' at requireAtom (/Users/jimtrenowden/Documents/GitHub/cerberus/node_modules/selenium-webdriver/lib/http.js:56:13) at Object.<anonymous> (/Users/jimtrenowden/Documents/GitHub/cerberus/node_modules/selenium-webdriver/lib/http.js:35:22) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object.<anonymous> (/Users/jimtrenowden/Documents/GitHub/cerberus/node_modules/selenium-webdriver/http/index.js:29:17) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17)

whenever I try to execute a test (both on macOS and Windows 10).

Any ideas?

Shoot. I unpublished for now and reset the latest to 4.0.0-alpha.1. I'll dig in and see what I missed. The next version will be published under alpha.3.

Awesome, thanks Dave.

I have a same issues like below in alpha.2

{ Error: Cannot find module '../../../../bazel-genfiles/javascript/node/selenium-webdriver/lib/atoms/get-attribute.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._resolveFilename (/Users/yeongjunwoo/WebstormProjects/mpc-backend/mpc-backend/node_modules/tsconfig-paths/lib/register.js:75:40)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at requireAtom (/Users/yeongjunwoo/WebstormProjects/mpc-backend/mpc-backend/node_modules/selenium-webdriver/lib/http.js:53:14)
    at Object.<anonymous> (/Users/yeongjunwoo/WebstormProjects/mpc-backend/mpc-backend/node_modules/selenium-webdriver/lib/http.js:35:22)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/yeongjunwoo/WebstormProjects/mpc-backend/mpc-backend/node_modules/ts-node/src/index.ts:414:14)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/yeongjunwoo/WebstormProjects/mpc-backend/mpc-backend/node_modules/selenium-webdriver/http/index.js:29:17)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/yeongjunwoo/WebstormProjects/mpc-backend/mpc-backend/node_modules/ts-node/src/index.ts:414:14)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/yeongjunwoo/WebstormProjects/mpc-backend/mpc-backend/node_modules/selenium-webdriver/chrome.js:133:14)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/yeongjunwoo/WebstormProjects/mpc-backend/mpc-backend/node_modules/ts-node/src/index.ts:414:14) code: 'MODULE_NOT_FOUND' }

Okay, alpha.3 is out.

Works great for me, thanks a lot! 😀

Looks good to me too, thanks again @tourdedave!

You're welcome!

So, status: since Selenium IDE relies heavily on the JS bindings, @corevo and I have started helping out where we can. We (@corevo, myself, and @jleyba) have started charting a path from alpha to a proper major release for the JS bindings.

Closing.

I have a same issues like below in 4.0.0-alpha.4

┏ Electron -------------------

  Error: Failed to import atoms module ./atoms/get-attribute.js. If running in dev mode, you need to run `bazel build //javascript/node/selenium-webdriver/lib/atoms:get-attribute.js` from the projectroot: Error: Cannot find module './atoms/get-attribute.js'
      at requireAtom (webpack-internal:///./node_modules/selenium-webdriver/lib/http.js:56:13)
      at eval (webpack-internal:///./node_modules/selenium-webdriver/lib/http.js:35:22)
      at Object../node_modules/selenium-webdriver/lib/http.js (/Users/zhouminghua/Documents/projects/argus/desktop/dist/main/main.js:927:1)
      at __webpack_require__ (/Users/zhouminghua/Documents/projects/argus/desktop/dist/main/main.js:704:30)
      at fn (/Users/zhouminghua/Documents/projects/argus/desktop/dist/main/main.js:78:20)
      at eval (webpack-internal:///./node_modules/selenium-webdriver/http/index.js:29:17)
      at Object../node_modules/selenium-webdriver/http/index.js (/Users/zhouminghua/Documents/projects/argus/desktop/dist/main/main.js:808:1)
      at __webpack_require__ (/Users/zhouminghua/Documents/projects/argus/desktop/dist/main/main.js:704:30)
      at fn (/Users/zhouminghua/Documents/projects/argus/desktop/dist/main/main.js:78:20)
      at eval (webpack-internal:///./node_modules/selenium-webdriver/chrome.js:133:14)

┗ ----------------------------

How to fix it?

I'm using 4.0.0-alpha.4 and the error IS still occurring. Any idea why?

@guifrrs Please open a new issue and follow the issue template (link)

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings