webdriver-io

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

こ雲淡風輕ζ 提交于 2020-04-16 08:25:08
问题 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'

Extending built-in types in Typescript

不羁的心 提交于 2020-02-24 14:14:39
问题 I have the following structure: project |- types |- global.d.ts |- string.d.ts |- wdio.d.ts |- src |- Models |- Resources |- Components |- Extensions |- string.ts |- ... |- tsconfig.json |- wdio.conf.js I try to extend the string's prototype with a function. I tried so far a lot of way, I found on several sites. But either the tsc gives me error, or the PHPStorm shows error message. // types/string.d.ts declare interface String { myCustomFn(text : string) : string; } // src/Extensions/string

Extending built-in types in Typescript

匆匆过客 提交于 2020-02-24 14:11:47
问题 I have the following structure: project |- types |- global.d.ts |- string.d.ts |- wdio.d.ts |- src |- Models |- Resources |- Components |- Extensions |- string.ts |- ... |- tsconfig.json |- wdio.conf.js I try to extend the string's prototype with a function. I tried so far a lot of way, I found on several sites. But either the tsc gives me error, or the PHPStorm shows error message. // types/string.d.ts declare interface String { myCustomFn(text : string) : string; } // src/Extensions/string

Extending built-in types in Typescript

爱⌒轻易说出口 提交于 2020-02-24 14:10:48
问题 I have the following structure: project |- types |- global.d.ts |- string.d.ts |- wdio.d.ts |- src |- Models |- Resources |- Components |- Extensions |- string.ts |- ... |- tsconfig.json |- wdio.conf.js I try to extend the string's prototype with a function. I tried so far a lot of way, I found on several sites. But either the tsc gives me error, or the PHPStorm shows error message. // types/string.d.ts declare interface String { myCustomFn(text : string) : string; } // src/Extensions/string

Trouble displaying test results in browser with Mocha, Chai, and webdriver.io

二次信任 提交于 2020-02-06 08:04:07
问题 I am using Webdriver.io with Mocha and Chai. I've written several tests that work great from the command line. It opens the Chrome browser, runs the tests, and displays the resultsin the command line. However I am having issues getting the results of the tests to display in the browser view (have a presentation that I would like to show the tests in the browser view). I'm using the mocha html template for viewing tests in the browser, but it only displays "passes: 0failures: 0duration: 0s" in

'UnknownError',message: 'An unknown server-side error occurred while processing the command.',orgStatusMessage: 'connection refused with webdriver.io

╄→尐↘猪︶ㄣ 提交于 2020-01-30 09:20:06
问题 I am following this guide: http://webdriver.io/guide.html and firefox version I am using 62.0 I followed following steps: I downloaded latest selenium-standalone-server version 3.14. I have downloaded latest gecko driver version 0.22.0 and extracted it in project folder Ran selenium standalone version using command java -jar -Dwebdriver.gecko.driver=./geckodriver selenium-server-standalone-3.5.3.jar Then run the command npm install webdriverio Created a test file test.js with code var

WebDriver element is returning false for isVisible/waitForForVisible

拟墨画扇 提交于 2020-01-25 11:52:29
问题 I am working on my first set of Cucumber tests in a Meteor app, but I cannot get the login step to work. My app uses a custom login plugin I wrote specifically for this project. Here is the step, as I currently have it defined with debug output: this.Given(/^I am logged in as a\/an "([^"]*)"$/, function(roleName, callback) { this.browser .url(url.resolve(process.env.HOST, '/')) .waitForExist('#appSignIn'); this.browser.getHTML('#appSignIn', function(err, html) { if (err) { console.log('err: '

Webdriver.io crashes with NoSessionIdError

天大地大妈咪最大 提交于 2020-01-15 10:52:01
问题 I'm trying to get webdriver.io and Jasmine working. Following their example, my script is at test/specs/first/test2.js (in accordance with the configuration) and contains: var webdriverio = require('webdriverio'); describe('my webdriverio tests', function() { var client = {}; jasmine.DEFAULT_TIMEOUT_INTERVAL = 9999999; beforeEach(function() { client = webdriverio.remote({ desiredCapabilities: {browserName: 'firefox'} }); client.init(); }); it('test it', function(done) { client .url("http:/

Webdriver.io crashes with NoSessionIdError

早过忘川 提交于 2020-01-15 10:50:36
问题 I'm trying to get webdriver.io and Jasmine working. Following their example, my script is at test/specs/first/test2.js (in accordance with the configuration) and contains: var webdriverio = require('webdriverio'); describe('my webdriverio tests', function() { var client = {}; jasmine.DEFAULT_TIMEOUT_INTERVAL = 9999999; beforeEach(function() { client = webdriverio.remote({ desiredCapabilities: {browserName: 'firefox'} }); client.init(); }); it('test it', function(done) { client .url("http:/

Override click command webdriverio

爷,独闯天下 提交于 2020-01-15 10:11:49
问题 I would like to override the click command in webdriverio Before every click i would check if the locator exist. I would like something like this: browser.addCommand("click", function () { browser.waitUntil() browser.click() }, true); What is the best way to implement this? --Update i implement no something like this: afterCommand: function (commandName) { if (['click'].includes(commandName)) { browser.waitUntilPageIsLoaded() } } After each click command i wait until the page is loaded. Works