JSPM

  • Created
  • Published
  • Downloads 228
  • Score
    100M100P100Q88561F
  • License MIT

steps to interact with wdio

Package Exports

  • @qavajs/steps-wdio
  • @qavajs/steps-wdio/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@qavajs/steps-wdio) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm version

@qavajs/steps-wdio

Step library to work with webdriverio in qavajs framework

Installation

npm install @qavajs/steps-wdio

Configuration

const App = require('./page_object');
module.exports = {
    default: {
        require: [
            'node_modules/@qavajs/steps-wdio/index.js'
        ],
        browser: {
            timeout: {
                present: 10000,
                visible: 20000,
                clickable: 15000,
                page: 10000,
                implicit: 0, //wdio implicit wait for element,
                element: 2000 //timeout to element to be accesible 
            },
            capabilities: {
                browserName: 'chrome'
            }
        },
        pageObject: new App()
    }
}

Screenshot Strategy

@qavajs/steps-wdio has build-in capability to take screenshot on particular event. If you need to add screenshot to your report add screenshot property to profile config. Supported events:

  • onFail
  • beforeStep
  • afterStep
module.exports = {
    default: {
        screenshot: ['onFail']
    }
}

Typescript

To properly use globals exposed by @qavajs/steps-wdio add corresponding types to tsconfig.json

{
  "compilerOptions": {
    "types": [
      "@qavajs/steps-wdio/globals"
    ]
  }
}

reuseSession

reuseSession flag allows to share session between tests in frames of process. But setting of this flag transfer session control to user.

module.exports = {
    default: {
        browser: {
            reuseSession: true
        }
    }
}