selenium-webdriver/testing module no longer available in npm package

Created on 25 Jun 2020  路  4Comments  路  Source: SeleniumHQ/selenium

馃挜 Regression Report

The selenium-webdriver/testing module is publicly documented but as of this commit (https://github.com/SeleniumHQ/selenium/commit/2d53be8ddb4b17226dc1c1dbcd9045a144ae8f8c#) it's no longer included in the npm package due to the testing/ directory being listed in the .npmignore.

It's not clear whether the intention was to remove the module but the docs weren't updated, or if this is a regression.

Last working Selenium version

Worked up to version: selenium-4.0.0-alpha-5

Stopped working in version: selenium-4.0.0-alpha-6

To Reproduce

  1. Install selenium-4.0.0-alpha-6
  2. Run node and try to import the module, eg.
    js const testing = require('selenium-webdriver/testing');

Expected behavior

Module not found error, example:

Thrown:
Error: Cannot find module 'selenium-webdriver/testing'
Require stack:
- <repl>
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15)
    at Function.Module._load (internal/modules/cjs/loader.js:677:27)
    at Module.require (internal/modules/cjs/loader.js:830:19)
    at require (internal/modules/cjs/helpers.js:68:18) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '<repl>' ]
}

Environment

Language Bindings version: Node selenium-4.0.0-alpha-6, selenium-4.0.0-alpha-7

needs-triaging

Most helpful comment

So, how can we make our code to work without this?

All 4 comments

The docs weren't updated, but my intention was to remove it, I think users should use the test framework directly, that file makes a lot of guesses around what you're using.

Clearly it is not the way to go about it atm, either I'll have to split it into its own package for the time being, similarly to how react split the test part of it to prop-types, or remove it outright, which is what I've done in hindsight.

What you can do atm is to copy that file over, until I can get the docs to generate again, there are bugs in the js parsing of it.

馃憤 Makes sense to me to remove it, just wanted to make sure that was the intention!

We've made a mocha-specific equivalent of ignore (which was the only function we were using) for now so we're happy enough sticking with that in any case.

Thanks!

Thank you both for replying, I will close this as things got clarified.

So, how can we make our code to work without this?

Was this page helpful?
0 / 5 - 0 ratings