webdriver-io

How to continue running scripts defined in package.json in case one fails?

旧城冷巷雨未停 提交于 2020-07-22 05:15:41
问题 I have this in package.json file: { "name": "test demo", "version": "1.0.0", "description": "test demo scripts", "scripts": { "test:v1": "wdio src/resources/config/wdio.chrome.conf.js --spec test/Tests.spec.ts", "test:v2": "wdio src/resources/config/wdio.firefox.conf.js --spec test/Tests.spec.ts", "test": "npm run test:v1 && npm run test:v2" }, ... } When run this command: npm run test then if test:v1 fails, then test:v2 script is not executed at all. Is there a way to configure this so that

Declare Nodejs global variables in “before” hook in WebdriverIO using TypeScript

旧巷老猫 提交于 2020-06-15 06:06:51
问题 I'm trying to port my JS WDIO project ot TypeScript I have faced the issue when during the development TypeScript is not recognizing my Nodejs global variables declared in before hook in my WDIO config: ... let chai = require('chai'); ... before: async function (capabilities, specs) { //setting global variables global.foo = "bar" global.expect= chai.expect; global.helpers = require("../helpers/helpers"); // ... etc. // ... etc. }, I came across different SO topics but seems like they are not

Declare Nodejs global variables in “before” hook in WebdriverIO using TypeScript

末鹿安然 提交于 2020-06-15 06:06:23
问题 I'm trying to port my JS WDIO project ot TypeScript I have faced the issue when during the development TypeScript is not recognizing my Nodejs global variables declared in before hook in my WDIO config: ... let chai = require('chai'); ... before: async function (capabilities, specs) { //setting global variables global.foo = "bar" global.expect= chai.expect; global.helpers = require("../helpers/helpers"); // ... etc. // ... etc. }, I came across different SO topics but seems like they are not

Declare Chai custom plugin as a NodeJS global variable in TypeScript

不羁岁月 提交于 2020-05-31 04:57:07
问题 Here is my previous question TL;DR: I'm trying to declare types for my NodeJS global variables (which I'm setting up in the before hook), so the TypeScript can recognize it. My wdio.conf: ... let chai = require('chai'); let { customAssert } = require('../helpers/customAssert'); ... before: async function (capabilities, specs) { // I have accomplished to declare types for this variables thanks to the answer in the previous question global.foo = "bar" global.expect= chai.expect; global.helpers

Navigating from Feature file to step defination: Any Plugins

谁说我不能喝 提交于 2020-05-17 08:07:09
问题 In visual studio cod, How to navigate from feature to step definition. Do we need any additional plugins or any configuration needs to be added. I have downloaded the Cucumber (Gherkin) Full Support plugin but still cannot navigate from .feature to the step definition. 回答1: The documentation of Cucumber (Gherkin) Full Support plugin has the explanation for it. You need to add the below in your settings: { "cucumberautocomplete.steps": [ "test/features/step_definitions/*.js", "node_modules/qa

Navigating from Feature file to step defination: Any Plugins

守給你的承諾、 提交于 2020-05-17 08:06:04
问题 In visual studio cod, How to navigate from feature to step definition. Do we need any additional plugins or any configuration needs to be added. I have downloaded the Cucumber (Gherkin) Full Support plugin but still cannot navigate from .feature to the step definition. 回答1: The documentation of Cucumber (Gherkin) Full Support plugin has the explanation for it. You need to add the below in your settings: { "cucumberautocomplete.steps": [ "test/features/step_definitions/*.js", "node_modules/qa

How to run two different wdio.config.js file one after another

半城伤御伤魂 提交于 2020-04-16 08:26:48
问题 I currently have two wdio.config.js files with different configurations. How can i run both one after another? Is it possible? This is how I am defining in the code: first config.js const { join } = require('path'); require('@babel/register') exports.config = { maxInstances: 3, runner: 'local', // specs: [ './tests/specs/**/*.spec.js' ], // exclude: [ // 'path/to/excluded/files' ], // // baseUrl: 'http://localhost:9174/', capabilities: { chromeBrowser: { capabilities: { browserName: 'chrome'