webdriver-io

How to search an specific button in a grid using webdriverIO

柔情痞子 提交于 2019-12-12 06:59:10
问题 I'm using an ExtJS grid panel. This grid has more than 20 rows of info and I want to search in each row for an icon that represents active mode , using WebdriverIO as a test driver. How can I search in each row till the test driver finds the first active icon? ( Note: the grid I'm testing is hosted on alegra.com ). Consider the following HTML print-screen: 回答1: It's hard to know exactly how to do it without knowing which locator you are using but if you first get a list of the rows and then

Step definitions library for Meteor-cucumber/chimp

与世无争的帅哥 提交于 2019-12-12 04:18:26
问题 Hi I am looking for predefined (common) step definitions for Meteor-cucumber\chimp. I used PHP's Behat (BDD cucumber framework). There is this extensions and this class. Which allows you to have a common step definitions out of the box. You don't need to write those step definitions by yourself. Down below it is the list of step definitions you got from Behat. 回答1: Short Answer This sort of step-def library doesn't exist and we (the authors of Chimp) won't be adding them because we have seen

Node.js - AWS - Program Terminates Before Upload to S3 Bucket Completes

我是研究僧i 提交于 2019-12-11 17:19:57
问题 I've written a program that creates HTML files. I then attempt to upload the files to my S3 bucket at the end of the program. It seems that the problem is that my program terminates before allowing the function to complete or receiving a callback from the function. Here is the gist of my code: let aws = require('aws-sdk'); aws.config.update({ //Censored keys for security accessKeyId: '*****', secretAccessKey: '*****', region: 'us-west-2' }); let s3 = new aws.S3({ apiVersion: "2006-03-01", });

Is it possible to access a variable declared in wdio.conf?

时间秒杀一切 提交于 2019-12-11 14:42:54
问题 In the wdio.conf onPrepare I am storing all my feature file's in a array. let listOfFiles = fs.readdirSync(process.cwd() + '/features'); var featureFiles = []; listOfFiles.map((file) => { featureFiles.push(file) }); Is it possible to use the featureFiles array in another file? I want to generate an list of feature files during execution and assign it to the variable "featureFiles" (which is declared but has no value to begin with). From what I've seen so far it's not possible to do this in

Click buttons on page until all will be removed

有些话、适合烂在心里 提交于 2019-12-11 10:23:32
问题 My scenario: On a page, I have multiple buttons. After button is clicked, page is reloaded without the clicked button. I have a problem with the implementation of a proper solution. Currently I have something like this: let selector = 'selector for All button on page'; let buttons = browser.$$(selector); for (int i = 0; i < buttons.length; i++) { let button = browser.$(selector); button.moveToObject(); button.waitForVisible(); button.click(); browser.waitToVisible(elementAfterPageRefresh); }

har file issue browsermob-proxy with webdriverio

百般思念 提交于 2019-12-11 09:54:11
问题 I was trying to use browsermob-proxy using this and this with webdriverio. It runs fine , but theres no har file generated. I tried changing the below line fs.writeFileSync('stuff.har', data, 'utf8'); to fs.writeFile('/Users/abc/xyz/stuff.har', data, 'utf8'); in the below code (from above links) var Proxy = require('browsermob-proxy').Proxy , webdriverio = require("./node_modules/webdriverio/") , fs = require('fs') , proxy = new Proxy() ; proxy.cbHAR('search.yahoo.com', doSeleniumStuff,

Where do I add custom commands in WebdriverIO with wdio testrunner?

霸气de小男生 提交于 2019-12-11 08:32:25
问题 I'm using Webdriver IO and its wdio testrunner with mocha and chai. I want to build some custom commands, but in this scenario, where and how is the best way to add custom commands? 回答1: While building a full-fledged automation harness powered by the exact tech-stack you mentioned ( WebdriverIO / Mocha & Chai ), I have come to the conclusion that Page Objects are't there yet (it's also a pain to keep them up-to-date) and the best way to harness the complete power of WebdriverIO is to write

Selenium ends randomly with uncaught error

自古美人都是妖i 提交于 2019-12-11 07:15:23
问题 I'm using mocha, webdriverio, phantomjs Trying to find a way why Selenium is failing in random cases (50% its ok, 50% breaks in different tests with the same code). The error is Uncaught RuntimeError (UnknownError:13) An unknown server-side error occurred while processing the command. Problem: POST /session//url Build info: version: '2.42.0', revision: '5e82430', time: '2014-05-22 19:00:03' System info: host: 'example.com', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6

Node.js ERROR Cannot find Module

≯℡__Kan透↙ 提交于 2019-12-11 04:44:14
问题 Hey guys I'm new to JS and Node.js and I'm having trouble setting up a webdriverio project using cucumber and PageObject. And every time I try to run a test this error happens: ERROR: Cannot find module '../support/action/openWebsite' chrome at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object.<anonymous> (/Users/axelbarford/Desktop/Oktana-training-webdriverio/src

Xolvio Cucumber - Getting errors in console yet all tests are passing

∥☆過路亽.° 提交于 2019-12-11 03:27:03
问题 I have the following code. It seems like my tests pass, but I get tons of errors in my console. What's going on? Are my tests non-deterministic and being re-run? If so how do I prevent the errors? login.feature: Feature: User authentication As a user I want to be able to login So that I can have all the good stuff that comes with user accounts Background: Given I am signed out Scenario: A user can sign up with valid information Given I am on the home page When I open the sign up modal And I