webdriver-io

WebdriverIO & Browsermob

爱⌒轻易说出口 提交于 2019-12-22 22:23:49
问题 I'm currently trying to use Browsermob with WebdriverIO and I found this code on another answer, but when I run it, the firefox browser comes up and I see activity in the console windows I have selenium and browsermob-proxy running, but it does not go to the search.yahoo.com page. It just sits at a blank page and the tests ends (which says it passed, but that's something else) I'm running the latest WebdriverIO and Browsermob on a Mac Here's the code var Proxy = require('browsermob-proxy')

WebdriverIO & Browsermob

可紊 提交于 2019-12-22 22:23:23
问题 I'm currently trying to use Browsermob with WebdriverIO and I found this code on another answer, but when I run it, the firefox browser comes up and I see activity in the console windows I have selenium and browsermob-proxy running, but it does not go to the search.yahoo.com page. It just sits at a blank page and the tests ends (which says it passed, but that's something else) I'm running the latest WebdriverIO and Browsermob on a Mac Here's the code var Proxy = require('browsermob-proxy')

How can I tell webdriver-io to use firefox developer edition?

二次信任 提交于 2019-12-22 08:03:43
问题 How can I tell webdriver-io to use firefox developer edition instead of normal firefox? I need to use CSS4 selectors which normal firefox does not support. I read the documentation but I can not find the option. 回答1: You need to redefine the location of Firefox by either setting set the binary capability: var webdriverio = require('webdriverio'); var options = { desiredCapabilities: { browserName: 'firefox', firefox_binary: 'C:\\...\\firefox.exe' } }; Or by starting the standalone server with

A simple WebdriverIO - Mocha test doesn't display browser

喜你入骨 提交于 2019-12-21 06:23:39
问题 I want to test NOT headlessly but I cannot do that. The below code start chrome browser . NOT headless . OK. // test.js var webdriverio = require('webdriverio'); var options = { desiredCapabilities: { browserName: 'chrome' } }; webdriverio .remote(options) .init() .url('http://www.google.com') .title(function(err, res) { console.log('Title was: ' + res.value); }) .end(); The below code ( Mocha test code) doesn't start chrome browser by $ mocha test.js . Headless . NG. But the test pass! I

webdriverio Loop through options in select element

孤人 提交于 2019-12-14 03:55:15
问题 Example HTML: <select id="random_text"> <option value="option1">asadka_TEST</option> <option value="option2">Peter Parker</option> <option value="option3">Clark Kent</option> <option value="option4">aldkfsd_TEST</option> </select> Javascript code in class class TestPage extends Page { get fullNameSelect() {return browser.element('#random_text');} iterateAndSelect() { this.fullNameSelect.value.ForEach() //pseudo code } } I want iterateAndSelect function to iterate through all options and

How to run webdriverio tests on firefox using wdio testRunner and wdio-selenium-standalone-service

不羁岁月 提交于 2019-12-13 20:14:06
问题 My environment: Mac OSX 10.12.6 webdriverio(using the test runner i.e., wdio)( "webdriverio": "^4.9.11" ) Cucumber framework ( "wdio-cucumber-framework": "^1.0.3" ) Using WDIO Selenium Standalone Service help to start the selenium service automatically.( "wdio-selenium-standalone-service": "0.0.10" ) firefox(version: 52) I am able to successfully run the tests on chrome browser(version: 65) but when it comes to firefox i always get connection refused error. More details: In the wdio config

How to print to PDF using Node JS / Webdriver.io / Chimp?

╄→гoц情女王★ 提交于 2019-12-13 02:59:39
问题 I'm trying to use Chimp / Webdriver.io / Selenium in Node JS to try to test my @media print CSS to make sure everything shows up correctly when people print from my website. How can I programatically get Chrome / Firefox to print to PDF? I don't want to convert a screenshot to PDF. I want the PDF to look like what it will look like when printed. Then, how can I scan the PDF to make sure that the results are correct? 回答1: Success! I had to install/use the following tools: npm install html-pdf

Inspect WebdriverIO spec variables

别等时光非礼了梦想. 提交于 2019-12-13 01:54:21
问题 I figured out, that I can use browser.pause(); to stop the execution of the browser and inspect its current variables, but how do I inspect the variables of my WebdriverIO test source? Of course I could call console.log() if I would like to know a value. But for every try I would have to restart the complete test suite, or I would need to comment every other test. Instead, I would ideally like to stop the execution in one line and inspect all available variables. Does somebody has a solution

WebdriverIO: How to read baseURL value from wdio.conf.js. inside step definition file

我怕爱的太早我们不能终老 提交于 2019-12-12 17:25:28
问题 I am using WebdriverIO for test automation. In wdio.conf.js file I have configured the 'baseUrl' property. I want to read the 'baseUrl' property value inside my test .js file. How can I do this? 回答1: ❒ wdio-v5 Lately, after writing a lot of tests for a project rewrite I've came to believe the best way to store/access global config variables is via the global object. You can define them inside the wdio.conf.js file's hooks. I defined mine in the before hook: before: function (capabilities,

Generate HTML report for WebdriverIO/Cucumber framework

狂风中的少年 提交于 2019-12-12 08:56:11
问题 I am using WebdriverIO/Cucumber ( wdio-cucumber-framework ) for my test automation. I want to get the test execution result in a HTML file. As of now I am using Spec Reporter ( wdio-spec-reporter ). Which helps to print the results in console window. But I want all the execution reports in a HTML file. How can I get WebdriverIO test execution result in a HTML file? Thanks. 回答1: OK, finally got some spare time to tackle your question @Thangakumar D. WebdriverIO reporting is a vast subject (