webdriver-io

WebdriverIO & Browsermob

有些话、适合烂在心里 提交于 2019-12-06 09:07:20
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').Proxy , webdriverio = require('webdriverio') , fs = require('fs') , proxy = new Proxy() ; proxy.cbHAR(

How can I change logfile path of phantomjs with selenium?

杀马特。学长 韩版系。学妹 提交于 2019-12-06 04:38:57
问题 When using phantomjs with selenium, I would like to change the default --webdriver-logfile parameter, that selenium passes to phantomjs. How can I do it? The corresponding line in selenium log: 11:06:06.960 INFO - arguments: [--webdriver=14380, --webdriver-logfile=<ROOT PATH DELETED HERE>/phantomjsdriver.log] Firing up phantomjs in coffeescript: webdriverio = require 'webdriverio' module.exports.World = World = (next) -> @browser = webdriverio.remote({ desiredCapabilities: { browserName:

How to simulate ctrl-click or shift-click with webdriver.io?

混江龙づ霸主 提交于 2019-12-05 10:29:20
With webdriver.io I would like to simulate clicks with a modifier like shift or ctrl . The keys() method seems to do something like that but it's not clear to me how to release a modifier key again and it throws an error when I use 16 (key code for shift ) as a parameter for the method - link . Background: In my webpage that I test I have a list of elements that are comparable to files and folders in a file browser and it is possible to select multiple of those with shift and ctrl . This works well and now I would like to test it with webdriver.io. To do this, webdriver.io e.g. has to click on

Automated Chrome hides text in CodeceptJS WebdriverIO test

爱⌒轻易说出口 提交于 2019-12-05 09:43:09
问题 I have a fresh install of Chrome Version 67.0.3396.87 and followed the https://codecept.io/quickstart/ to init a project and create the following test: Feature('Hidden Text'); Scenario('test something', (I) => { I.amOnPage('/'); pause(); }); The codecept.json config is pretty standard: { "tests": "./*_test.js", "timeout": 10000, "output": "./output", "helpers": { "WebDriverIO": { "url": "https://codecept.io", "browser": "chrome" } }, "include": { "I": "./steps_file.js" }, "bootstrap": false,

Generate HTML report for WebdriverIO/Cucumber framework

。_饼干妹妹 提交于 2019-12-04 14:57:00
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. OK, finally got some spare time to tackle your question @Thangakumar D . WebdriverIO reporting is a vast subject ( there are multiple ways to generate such a report ), so I'll go ahead and start with my favorite reporter:

How can I change logfile path of phantomjs with selenium?

三世轮回 提交于 2019-12-04 11:09:25
When using phantomjs with selenium, I would like to change the default --webdriver-logfile parameter, that selenium passes to phantomjs. How can I do it? The corresponding line in selenium log: 11:06:06.960 INFO - arguments: [--webdriver=14380, --webdriver-logfile=<ROOT PATH DELETED HERE>/phantomjsdriver.log] Firing up phantomjs in coffeescript: webdriverio = require 'webdriverio' module.exports.World = World = (next) -> @browser = webdriverio.remote({ desiredCapabilities: { browserName: 'phantomjs' "phantomjs.binary.path": "node_modules/phantomjs/bin/phantomjs" }}) .init() next() I was

WebDriverIO: Starting Chrome with browser sessions & cookies

只谈情不闲聊 提交于 2019-12-04 06:43:39
问题 Is it possible to run a WebdriverIO test case with Google Chrome, without creating a "private Chrome window" ( no cache or cookies ). I want to start the Chrome browser I want to use the cookies and cache from Chrome, not a completely default state Scenario: I am logging into our back-end on Chrome, which sets a token that I use on my localhost. When I run a test through Webdriverio, it doesn't have the token and I have to go through the login process once more. So, in the terminal, if I run

Build Mocha test dynamically after getting data from webdriver.io

▼魔方 西西 提交于 2019-12-04 03:36:40
问题 I'm looking for a solution to define Mocha tests after getting data asynchronously. For now, I use gulp-webdriver to getting HTML content with Selenium. And I want tests certain HTML tags structure. For example, I want to get all buttons structure from an HTML page. 1° In Mocha Before(), I get buttons : var buttons = browser.url("url").getHTML("button"); 2° And after that, I want tests each button in a separate it : buttons.forEach(function(button) { it() }); The only solution found is

Automated Chrome hides text in CodeceptJS WebdriverIO test

别等时光非礼了梦想. 提交于 2019-12-03 21:49:13
I have a fresh install of Chrome Version 67.0.3396.87 and followed the https://codecept.io/quickstart/ to init a project and create the following test: Feature('Hidden Text'); Scenario('test something', (I) => { I.amOnPage('/'); pause(); }); The codecept.json config is pretty standard: { "tests": "./*_test.js", "timeout": 10000, "output": "./output", "helpers": { "WebDriverIO": { "url": "https://codecept.io", "browser": "chrome" } }, "include": { "I": "./steps_file.js" }, "bootstrap": false, "mocha": {}, "name": "chrome-missing-text" } When I run the test all text is hidden: Interestingly this

WebdriverIO - Take full-page screenshot

两盒软妹~` 提交于 2019-12-03 16:47:07
I'm trying to take a screenshot of the full page using WebdriverIO. I've read that the best method is to use WebdriverCSS to enhance my WebdriverIO flows. WebdriverCSS automatically screenshots the entire page?? The problem is that WebdriverCSS is not working for me. I think it's because it is not yet compatible with webdriverio@3.0.x . Is there any way to make it work or another solution that I could use? My code: ( which is producing nothing but undefined values in the callback ) // Initialize WebdriverCSS for `client` instance require('webdrivercss').init(driver, { // example options