Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Framework Configuration
✓ // wdio.conf.js
module.exports = {
// ...
framework: 'jasmine',
// ...
};
✗ import { jasmine } from 'wdio-jasmine-framework';
This package is not imported directly into test files. It is configured via the `framework` option in the `wdio.conf.js` configuration file. Modern WebdriverIO uses `@wdio/jasmine-framework`.
Global browser object
✓ describe('My test suite', () => {
it('should navigate to a page', async () => {
await browser.url('https://example.com');
await expect(browser).toHaveTitle('Example Domain');
});
});
The `browser` object and Jasmine's BDD functions (`describe`, `it`, `expect`) are made globally available by the WebdriverIO test runner and Jasmine, respectively, not directly imported from this framework adapter. This behavior is consistent across WebdriverIO versions.
jasmineNodeOpts
✓ // wdio.conf.js
module.exports = {
// ...
jasmineNodeOpts: {
defaultTimeoutInterval: 60000,
expectationResultHandler: function(passed, assertion) {
if (!passed) {
console.log(`Assertion failed: ${assertion.message}`);
// Example: browser.saveScreenshot(`./screenshots/${assertion.fullName}.png`);
}
}
}
// ...
};
These options are configured directly within the `wdio.conf.js` file under the `jasmineNodeOpts` key. They are specific to the Jasmine runner's behavior.
This quickstart demonstrates a basic `wdio.conf.js` configuration using the `wdio-jasmine-framework` and a simple Jasmine spec file. It showcases how to set up the framework and use global `browser` commands with Jasmine's `expect` assertions. It highlights basic navigation and element interaction with assertion. Note this configuration is for older WebdriverIO versions (pre-v5) and is provided for historical context.
/* wdio.conf.js */
const path = require('path');
exports.config = {
runner: 'local',
specs: [
'./test/specs/**/*.js'
],
exclude: [],
maxInstances: 1,
capabilities: [{
maxInstances: 1,
browserName: 'chrome'
}],
logLevel: 'info',
bail: 0,
baseUrl: 'http://localhost',
waitforTimeout: 10000,
connectionRetryTimeout: 120000,
connectionRetryCount: 3,
services: [],
framework: 'jasmine',
jasmineNodeOpts: {
defaultTimeoutInterval: 30000, // Extend timeout for example tests
expectationResultHandler: function(passed, assertion) {
if (!passed) {
console.error(`Jasmine Assertion Failed: ${assertion.message} - ${assertion.fullName}`);
// In a real scenario, you might take a screenshot here
// browser.saveScreenshot(`./error_screenshots/${assertion.fullName}.png`);
}
}
},
reporters: ['spec'],
compilerOptions: {
module: 'commonjs',
target: 'es5'
},
autoCompile: true,
};
/* test/specs/example.js */
describe('Example WebdriverIO with Jasmine', () => {
it('should have the correct title', async () => {
await browser.url('https://webdriver.io');
await expect(browser).toHaveTitle('WebdriverIO · Next-gen browser and mobile automation test framework for Node.js');
});
it('should find an element by text', async () => {
await browser.url('https://webdriver.io');
const gettingStartedLink = await $('[href="/docs/gettingstarted"]');
await expect(gettingStartedLink).toBePresent();
await expect(gettingStartedLink).toHaveTextContaining('Getting Started');
});
});
Debug
Known issues
breakingThis `wdio-jasmine-framework` package (version 0.3.8, last updated 7 years ago) is completely abandoned and incompatible with modern WebdriverIO versions (v5, v6, v7, v8, v9). Attempting to use it with recent WebdriverIO installations will lead to errors and unexpected behavior.fixMigrate to the official and actively maintained `@wdio/jasmine-framework` package. Run `npm install @wdio/jasmine-framework --save-dev` and update your `wdio.conf.js` to use `framework: '@wdio/jasmine-framework'`.
affects: >=1.0.0 (for WebdriverIO itself)
deprecatedThe `wdio-jasmine-framework` package uses deprecated Jasmine functions, leading to warnings in test reports. This indicates its outdated nature and lack of alignment with current Jasmine best practices.fixUpgrade to `@wdio/jasmine-framework`, which supports modern Jasmine versions and practices.
affects: 0.3.8
gotchaDue to its age, this package lacks support for modern JavaScript features (e.g., async/await natively in tests without transpilation) and TypeScript. Using it in a modern development environment will require extensive polyfills or older Babel/TypeScript configurations, which is not recommended. WebdriverIO v7 and later have a strong focus on TypeScript support.fixFor modern JavaScript and TypeScript support, use `@wdio/jasmine-framework` with a recent WebdriverIO version and corresponding `tsconfig.json` or Babel configuration.
affects: <=0.3.8
gotchaSecurity vulnerabilities are likely present in this abandoned package and its old dependencies, as it has not received updates for over seven years. Using it in production or sensitive environments poses a significant security risk.fixDiscontinue use immediately. Replace with `@wdio/jasmine-framework` for a secure and maintained solution. Ensure all dependencies are kept up-to-date.
affects: <=0.3.8
Errors
Common errors & fixes
Error: Cannot find module 'wdio-jasmine-framework'
The package `wdio-jasmine-framework` is not installed or the `framework` option in `wdio.conf.js` points to the wrong module.
fixIf trying to use a modern WebdriverIO setup, you should install and use the current adapter: `npm install @wdio/jasmine-framework --save-dev`. Then, update your `wdio.conf.js` to `framework: '@wdio/jasmine-framework'`. If intentionally targeting a very old WebdriverIO version, ensure `npm install wdio-jasmine-framework --save-dev` was run successfully.
DEPRECATION: Calling `fail` with an error message of type `Error` is deprecated. Pass a string instead.
The `wdio-jasmine-framework` package uses outdated Jasmine APIs that generate deprecation warnings with newer Jasmine versions, even if those versions are compatible with this adapter.
fixThis specific warning cannot be fixed within `wdio-jasmine-framework` itself as it's an abandoned package. The only true fix is to migrate to the actively maintained `@wdio/jasmine-framework` package, which is compatible with current Jasmine versions.
Error: Given framework 'jasmine' was not found! Do you have the corresponding WDIO adapter installed?
WebdriverIO cannot find the installed Jasmine framework adapter. This typically happens when using a newer WebdriverIO CLI which expects scoped packages (like `@wdio/jasmine-framework`) but an old `wdio-jasmine-framework` is present, or no adapter is installed.
fixEnsure you have the correct, modern Jasmine adapter installed: `npm install @wdio/jasmine-framework --save-dev`. Then, configure `framework: '@wdio/jasmine-framework'` in your `wdio.conf.js`. If you're using an extremely old WebdriverIO version, ensure `wdio-jasmine-framework` is installed and the `framework` name is 'jasmine'.
Audit
Dependencies
webdriveriorequiredThis package is a framework adapter for WebdriverIO and requires a compatible WebdriverIO installation to function. It is only compatible with very old versions of WebdriverIO (likely v3/v4).
jasminerequiredThis adapter integrates the Jasmine testing framework. Jasmine must be available as a dependency for the framework to execute tests.