{"id":12653,"library":"wdio-jasmine-framework","title":"WebdriverIO Jasmine Framework Adapter (Legacy)","description":"This package, `wdio-jasmine-framework`, is an **abandoned** framework adapter for older versions of WebdriverIO, specifically designed for WebdriverIO v3 or v4. Its last update was 7 years ago, with version 0.3.8. It integrates the Jasmine testing framework with the WebdriverIO test runner, allowing users to write end-to-end tests using Jasmine's BDD syntax. Unlike its modern counterpart, `@wdio/jasmine-framework`, this package is not compatible with current WebdriverIO versions (v7, v8, v9) due to significant architectural changes and dependency updates within the WebdriverIO ecosystem. Its primary function was to enable Jasmine `describe`, `it`, and `expect` syntax within WebdriverIO test files, along with configuration options like `defaultTimeoutInterval` and `expectationResultHandler` via `wdio.conf.js`. Users requiring Jasmine integration with modern WebdriverIO should use the actively maintained `@wdio/jasmine-framework` package.","status":"abandoned","version":"0.3.8","language":"javascript","source_language":"en","source_url":"https://github.com/webdriverio/wdio-jasmine-framework","tags":["javascript","jasmine","webdriverio","wdio","wdio-plugin","wdio-framework"],"install":[{"cmd":"npm install wdio-jasmine-framework","lang":"bash","label":"npm"},{"cmd":"yarn add wdio-jasmine-framework","lang":"bash","label":"yarn"},{"cmd":"pnpm add wdio-jasmine-framework","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This 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).","package":"webdriverio","optional":false},{"reason":"This adapter integrates the Jasmine testing framework. Jasmine must be available as a dependency for the framework to execute tests.","package":"jasmine","optional":false}],"imports":[{"note":"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`.","wrong":"import { jasmine } from 'wdio-jasmine-framework';","symbol":"Framework Configuration","correct":"// wdio.conf.js\nmodule.exports = {\n  // ...\n  framework: 'jasmine',\n  // ...\n};"},{"note":"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.","symbol":"Global browser object","correct":"describe('My test suite', () => {\n  it('should navigate to a page', async () => {\n    await browser.url('https://example.com');\n    await expect(browser).toHaveTitle('Example Domain');\n  });\n});"},{"note":"These options are configured directly within the `wdio.conf.js` file under the `jasmineNodeOpts` key. They are specific to the Jasmine runner's behavior.","symbol":"jasmineNodeOpts","correct":"// wdio.conf.js\nmodule.exports = {\n  // ...\n  jasmineNodeOpts: {\n    defaultTimeoutInterval: 60000,\n    expectationResultHandler: function(passed, assertion) {\n      if (!passed) {\n        console.log(`Assertion failed: ${assertion.message}`);\n        // Example: browser.saveScreenshot(`./screenshots/${assertion.fullName}.png`);\n      }\n    }\n  }\n  // ...\n};"}],"quickstart":{"code":"/* wdio.conf.js */\nconst path = require('path');\n\nexports.config = {\n  runner: 'local',\n  specs: [\n    './test/specs/**/*.js'\n  ],\n  exclude: [],\n  maxInstances: 1,\n  capabilities: [{\n    maxInstances: 1,\n    browserName: 'chrome'\n  }],\n  logLevel: 'info',\n  bail: 0,\n  baseUrl: 'http://localhost',\n  waitforTimeout: 10000,\n  connectionRetryTimeout: 120000,\n  connectionRetryCount: 3,\n  services: [],\n  framework: 'jasmine',\n  jasmineNodeOpts: {\n    defaultTimeoutInterval: 30000, // Extend timeout for example tests\n    expectationResultHandler: function(passed, assertion) {\n      if (!passed) {\n        console.error(`Jasmine Assertion Failed: ${assertion.message} - ${assertion.fullName}`);\n        // In a real scenario, you might take a screenshot here\n        // browser.saveScreenshot(`./error_screenshots/${assertion.fullName}.png`);\n      }\n    }\n  },\n  reporters: ['spec'],\n  compilerOptions: {\n    module: 'commonjs',\n    target: 'es5'\n  },\n  autoCompile: true,\n};\n\n/* test/specs/example.js */\ndescribe('Example WebdriverIO with Jasmine', () => {\n  it('should have the correct title', async () => {\n    await browser.url('https://webdriver.io');\n    await expect(browser).toHaveTitle('WebdriverIO · Next-gen browser and mobile automation test framework for Node.js');\n  });\n\n  it('should find an element by text', async () => {\n    await browser.url('https://webdriver.io');\n    const gettingStartedLink = await $('[href=\"/docs/gettingstarted\"]');\n    await expect(gettingStartedLink).toBePresent();\n    await expect(gettingStartedLink).toHaveTextContaining('Getting Started');\n  });\n});","lang":"javascript","description":"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."},"warnings":[{"fix":"Migrate 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'`.","message":"This `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.","severity":"breaking","affected_versions":">=1.0.0 (for WebdriverIO itself)"},{"fix":"Upgrade to `@wdio/jasmine-framework`, which supports modern Jasmine versions and practices.","message":"The `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.","severity":"deprecated","affected_versions":"0.3.8"},{"fix":"For modern JavaScript and TypeScript support, use `@wdio/jasmine-framework` with a recent WebdriverIO version and corresponding `tsconfig.json` or Babel configuration.","message":"Due 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.","severity":"gotcha","affected_versions":"<=0.3.8"},{"fix":"Discontinue use immediately. Replace with `@wdio/jasmine-framework` for a secure and maintained solution. Ensure all dependencies are kept up-to-date.","message":"Security 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.","severity":"gotcha","affected_versions":"<=0.3.8"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"If 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.","cause":"The package `wdio-jasmine-framework` is not installed or the `framework` option in `wdio.conf.js` points to the wrong module.","error":"Error: Cannot find module 'wdio-jasmine-framework'"},{"fix":"This 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.","cause":"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.","error":"DEPRECATION: Calling `fail` with an error message of type `Error` is deprecated. Pass a string instead."},{"fix":"Ensure 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'.","cause":"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.","error":"Error: Given framework 'jasmine' was not found! Do you have the corresponding WDIO adapter installed?"}],"ecosystem":"npm"}