Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 12 23:39
    mauriceKA commented #8279
  • Aug 12 14:44
    erwinheitzman commented #8672
  • Aug 12 14:42
    erwinheitzman commented #8672
  • Aug 12 14:40
    erwinheitzman commented #8672
  • Aug 12 14:40
    erwinheitzman commented #8672
  • Aug 12 14:40
    erwinheitzman commented #8672
  • Aug 12 14:39
    erwinheitzman commented #8672
  • Aug 12 14:19
    christian-bromann commented #8672
  • Aug 12 13:56
    erwinheitzman commented #8672
  • Aug 12 13:56
    erwinheitzman commented #8672
  • Aug 12 13:54
    erwinheitzman commented #8672
  • Aug 12 11:58

    christian-bromann on cb-expect-webdriverio-update

    (compare)

  • Aug 12 11:58

    christian-bromann on main

    update expect-webdriverio and i… (compare)

  • Aug 12 11:58
    christian-bromann closed #8698
  • Aug 12 11:57
    christian-bromann synchronize #8698
  • Aug 12 11:57

    christian-bromann on cb-expect-webdriverio-update

    remove matcher typing remove matcher typing (compare)

  • Aug 12 11:33
    christian-bromann commented #8672
  • Aug 12 11:31
    christian-bromann synchronize #8698
  • Aug 12 11:31

    christian-bromann on cb-expect-webdriverio-update

    overwrite expect when run jasmi… (compare)

  • Aug 12 09:34
    BorisOsipov commented #8672
Syed Rizvi
@irtiza
@christian-bromann is there a way to rerun whole suites if there is just 1 failure? I know in jasmine I can try it blocks but I want to retry whole spec
Christian Bromann
@christian-bromann
@irtiza please don’t ping people directly and ask the channel instead
Syed Rizvi
@irtiza
@here thank you.
Lakshmi Kamineni
@skamineni
Hi, We see lot of ERROR webdriver: GotError: socket hang up now a days in V6. Does anyone has any idea ?
Jordan Brant Baker
@hexsprite
Hi, I'm working on porting my test suite to wdio. The 1st test runs fine but in watch mode on subsequent runs I get RequestError: connect ECONNREFUSED 127.0.0.1:4444. If I restart the process it runs fine. How can I fix watch mode? I'm using all the latest versions of the published wdio packages and chromedriver
3 replies
TiagoEusebioMarques
@TiagoEusebioMarques

hello. when i try to run my tests this message appear on my terminal:
automated_testing
automated_testing
/var/www/automated-tests/node_modules/@wdio/cli/node_modules/fs-extra/lib/mkdirs/make-dir.js:86
} catch {
^

SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/var/www/automated-tests/node_modules/@wdio/cli/node_modules/fs-extra/lib/mkdirs/index.js:3:44)

i already updated my wdio package and it still appears.

My package list:
"@wdio/allure-reporter": "^6.1.12",
"@wdio/cli": "^6.1.12",
"@wdio/dot-reporter": "^6.1.9",
"@wdio/local-runner": "^6.1.12",
"@wdio/mocha-framework": "^6.1.8",
"@wdio/sauce-service": "^5.3.2",
"@wdio/spec-reporter": "^6.1.12",
"@wdio/sync": "^6.1.8",
"wdio-chromedriver-service": "^6.0.3",
"wdio-intercept-service": "^4.0.0",
"webdriverio": "^6.1.12"

mariobianco
@mariobianco

:point_up: May 22, 2020 2:20 PM

Friendly bump. I am unable to get the wdio log level of trace to print anything. I can only get levels debug and up to print info.

I'm wishing to see trace levels to see if it would help debug this cryptic error some of my team members are receiving in which the Chrome browser instance is failing to launch for them.
This is the output they receive (not too informative as to why it is failing to spin up a Chrome browser instance) -- it simply outputs [0-0] FAILED and that's it:

Execution of 1 spec files started at 2020-05-22T20:36:07.222Z
2020-05-22T20:36:07.227Z INFO @wdio/cli:launcher: Run onPrepare hook
2020-05-22T20:36:07.252Z INFO @wdio/local-runner: Start worker 0-0 with arg: src/conf/wdio.final.conf.js,--spec,src/test/some_feature/some_test/auto-orders-poc.spec.ts
[0-0] 2020-05-22T20:36:07.779Z INFO @wdio/local-runner: Run worker command: run
[0-0] FAILED
2020-05-22T20:36:25.633Z INFO @wdio/cli:launcher: Run onComplete hook
Spec Files:     0 passed, 1 failed, 1 total (100% completed) in 00:00:18 
2020-05-22T20:36:25.637Z INFO @wdio/local-runner: Shutting down spawned worker
2020-05-22T20:36:25.892Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2020-05-22T20:36:25.893Z INFO @wdio/local-runner: shutting down
Lakshmi Kamineni
@skamineni
anyone seeing socket hangup with V6 ? If so please help us.
43 replies
dagoud
@dagoud
@irtiza are you using mocha test framework? If so we achieved this with combination of bail:true in mochaOpts and specFileRetries: 1, in your wdio.conf.js
Gintautas Kazlauskas
@ploover
Hiya, from what I've read I understand that wdio has all of the JSON Wire protocol commands implemented, so why am I getting browser.getLocalStorage is not a function when I'm trying to call browser.getLocalStorage or browser.setLocalStorage
Erwin Heitzman
@erwinheitzman
@ploover the JSON Wire protocol is a old protocol that is no longer used by most browsers, hence the drivers listen to the newer Webdriver protocol instead
Lakshmi Kamineni
@skamineni
image.png
@erwinheitzman that ^
kblain1967
@kblain1967
I updated the following packages
"@wdio/allure-reporter": "^6.0.0",
"@wdio/browserstack-service": "^6.0.0",
"@wdio/cli": "^6.0.0",
"@wdio/local-runner": "^6.0.0",
"@wdio/logger": "^6.0.0",
"@wdio/mocha-framework": "^6.0.0",
"@wdio/reporter": "^6.0.0",
"@wdio/spec-reporter": "^6.0.0",
to v6 and I'm unable to create the sessions and get the errors: Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames...
1 reply
I did setup my services section:
image.png
kiranmai1202
@kiranmai1202
what is the webdriverio command to execute single test suite?
I tried this npm test -- --spec=login.js
This is giving me error
could someone pls suggest. Thq
when i am trying to execute the above command, window is hanging and not opening chrome instance
kblain1967
@kblain1967
should be `npm run test -- --spec <FULL PATH to spec >
Erwin Heitzman
@erwinheitzman
@kiranmai1202 that depends what you mean by suite but this should help you https://webdriver.io/docs/organizingsuites.html#run-suites-and-test-specs
kiranmai1202
@kiranmai1202
am running only one spec
Erwin Heitzman
@erwinheitzman
check the link
all the info is there
kiranmai1202
@kiranmai1202
sure, going through it
Erwin Heitzman
@erwinheitzman
IanHop
@IanHop
Does anyone else have issues setting cookies in safari? Its the only browser that seems to not work for me
manoj0516
@manoj0516
chromedriver not getting updated to 83.x.x, is there a way we can update through node?
Viacheslav
@Gordiievskyi

Hi guys, need help with wdio 6 mocha with opt delay. I can't make it work.

This code works in pure mocha:

var assert = require('assert');
async function returnArr() {
  return [2, 2, 1];
}

setTimeout(async function() {
  const arr = await returnArr();

  describe('my suite', function() {
    for (let el of arr) {
      it(`Is element ${el} has index 1`, async function() {
        assert.equal(arr.indexOf(el), 1);
      });
    }
  });

  run();
}, 500);

But skips it in wdio mocha 'Spec Files: 0 passed, 1 skipped, 1 total (100% completed) in 00:00:03 '

Thats set up for mocha frmaework in the config:

  mochaOpts: {
    ui: 'bdd',
    timeout: 3600000,
    delay: true
  },

Also synchronous version works in wdio(with deleted delay option)

function returnArr() {
  return [2, 2, 1];
}

const arr =  returnArr();

describe('my suite', function() {
  for (let el of arr) {
    it(`Is element ${el} has index 1`, async function() {
      assert.equal(arr.indexOf(el), 1);
    });
  }
});
mikelbauer
@mikelbauer
so, searching back in this gitter for my answer, I don't really find anything, lots of people asking, no one answering. is there not a way in v6 to scroll with an offset anymore? Is my only option to run an execute and use javascript?
3 replies
Mircea Rosioru
@MirceaRosioru_twitter
Hello guys! Quick question: is there a way to use the mocha afterHook to make a screenshot on browser's console? If it is what would be the best practice for this?
Christian Bromann
@christian-bromann
@MirceaRosioru_twitter I recommend to do screenshots in the afterTest hook of your wdio config
Mircea Rosioru
@MirceaRosioru_twitter
I configured the afterTest hook to take a screenshot, but i would like to capture the console of the browser in that screenshot as well, that is what i am trying to do.
Dmitry Munda
@dimkin-eu
why not to save console logs as text ???
Mircea Rosioru
@MirceaRosioru_twitter
well i did not know that this could be done. I tried this casue it seemed like a good ideea ( i am new to this) :D
image.png
Slava Markovski
@slavamarkovski

Hello. I've just started using WDIO - it is really cool. Thank you for the job you've done guys!
And, of course, I have a question - I'm extending browser commands and adding new ones, but Typescript compiler is not really happy. Here is example from the documentation

browser.overwriteCommand('click', function (origClickFunction, { force = false } = {}) { ... });
$('..').click({ force: true })
result is compile error Argument of type '{ force: boolean; }' is not assignable to parameter of type 'ClickOptions'

one more example:
browser.addCommand('isDisplayedAndBlurred', function () { ... });
$('..').isDisplayedAndBlurred()
result is "Property 'clickIfCollapsed' does not exist on type 'Element'."

with ts-ignore everything works like a charm. However there are still compile errors and autocomplete in IDE (WebStorm) doesn't work.
I there any way to fix it?
Thank you in advance.

krishna-auto
@krishna-auto

@krishna-auto there's a blog about that right here https://webdriver.io/blog/2019/06/25/file-upload.html

Hi @erwinheitzman , this worked for me on chrome, but its failing on headless chrome execution and as well as non-headless/headless mode in firefox, same failure "element is not interactable" error, In the above given link its given that "that is currently only supported when running Chrome", anyway to make it work on firefox && chrome headless? Thanks!

Hi, any idea how to make this work on firefox? Thanks!

Christian Bromann
@christian-bromann
@slavamarkovski if you overwrite or add custom commands you need to extend the type definitions yourself
I would not recommend overwriting commands and rather work with page objects
Roman Drobishevski
@romadrobishevski
@christian-bromann is it a known issue when you upgrade your wdio/cli to 6th or higher version
then there is a promise rejection error for uuid module appears? on Mac
Gintautas Kazlauskas
@ploover
browser.execute() doesn't seem to be functional, I was trying to set local storage, but after further testing I found that even things like console.log() or alert() don't work. Are there any prerequisites to use browser.execute()?
1 reply
Christian Bromann
@christian-bromann
@romadrobishevski please don’t ping people directly for requests and ask the channel (please see our channel rules ;-))
Roman Drobishevski
@romadrobishevski
Sorry. I've already asked about it. Nobody answered. But it is quite critical for Mac users i guess.
21 replies
I would like fully upgrade my package but can not do it because of that uuid promise issue
Anton Rybalko
@anton.rybalko_gitlab
image.png
@romadrobishevski
Mircea Rosioru
@MirceaRosioru_twitter
can anybody help me in finding a way to save the browser's console info using webdriverIO V6+ JS Mocha? any specific methods or commands, or documentation related with this?
12 replies