Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 12:49

    christian-bromann on npm_and_yarn

    (compare)

  • 12:49

    christian-bromann on master

    Bump jasmine from 3.6.1 to 3.6.… (compare)

  • 12:49
    christian-bromann closed #6039
  • 12:49

    christian-bromann on npm_and_yarn

    (compare)

  • 12:48
    dependabot-preview[bot] commented #6040
  • 12:48
    christian-bromann closed #6040
  • 12:48

    christian-bromann on npm_and_yarn

    (compare)

  • 12:48

    christian-bromann on master

    Bump @typescript-eslint/eslint-… (compare)

  • 12:48
    christian-bromann closed #6041
  • 12:48

    christian-bromann on npm_and_yarn

    (compare)

  • 12:48

    christian-bromann on master

    Bump @typescript-eslint/parser … (compare)

  • 12:48
    christian-bromann closed #6042
  • 12:48

    christian-bromann on master

    Bump eslint from 7.12.0 to 7.12… (compare)

  • 12:48

    christian-bromann on npm_and_yarn

    (compare)

  • 12:48
    christian-bromann closed #6043
  • 11:24
    jsf-clabot commented #6043
  • 11:24
    dependabot-preview[bot] labeled #6043
  • 11:24
    dependabot-preview[bot] opened #6043
  • 11:24

    dependabot-preview[bot] on npm_and_yarn

    Bump eslint from 7.12.0 to 7.12… (compare)

  • 11:22
    jsf-clabot commented #6042
Stefan Schweigert
@stefanschweigert
How do I do that sorry?
Stefan Schweigert
@stefanschweigert
troyyer
@troyyer
@mgrybyk much appreciated with you taking the time to help me out. After following what you mentioned to perform, I found the error in my code. I had been nesting the commands in a browser.call block incorrectly. I have the code working as expected.
Mykola Grybyk
@mgrybyk
@troyyer really glad it works!
@stefanschweigert don't have an example anywhere. The idea is to compile files with tsc, then run compiled files instead of ts
It requires some time, not just an easy switch. You might have go update paths, config, etc
I'll try to publish some example soon, but it would take some time
Divy Tolia
@designMoreWeb
I am running allure reports with jenkins but when i click on the allure report i get a 404
Prashant Palikhe
@prashantpalikhe

Hi there,

we started receiving these errors in our pipelines recently. Any direction to what might have caused this will be greatly appreciated.

[0-1] 2020-10-27T06:59:03.585Z WARN webdriver: Request failed due to session not created: This version of ChromeDriver only supports Chrome version 85
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '4eb573f4-d630-456b-9639-4ca438d67448-7nc4s', ip: '10.37.197.69', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.143-flatcar', java.version: '11.0.6'
Driver info: driver.version: unknown
remote stacktrace: #0 0x55c4c1684a39 <unknown>

Our setup is the following:

"@wdio/cli": "^5.15.2",
"@wdio/local-runner": "^5.13.2",
"@wdio/mocha-framework": "^5.13.2",
"@wdio/selenium-standalone-service": "^5.13.2",
"@wdio/spec-reporter": "^5.13.2",
"@wdio/sync": "^5.13.2",

Faiza
@faizaaslam1
Automating android app. Error: "Locator Strategy ‘css selector’ is not supported for this session" I am following the documentation . how can i locate an element through resource-id?
2 replies
kfir ben hamou
@kfirbhCS

Hi all
using V 6.6.6

did anyone ever encounter this error when trying to access the local storage
browser.getLocalStorage is not a function

1 reply
Mahesh
@mbhandigare
I want set value attribute for DateField textBox with executeScript. Below code is not working.
browser.executeScript("document.getElementById('" + locator + "').value;", [text]);
1 reply
Olga
@osmolyar
@stefanschweigert you could pass max-old-space-size like this when running wdio: node --max-old-space-size=8192 node_modules\@wdio\cli\bin\wdio.js wdio.conf.js
hico-bst
@hico-bst
Hello everyone! I'm finally migrating from v4 to v6 and so far I had no real trouble doing so :)
But I notice that now actions like $(...).click implicitly wait for the element to eventually appear instead of throwing right away, and I can't find a way to disable that behavior. I tried calling browser.setTimeout({implicit: 1}); in the before hook in the wdio.conf.ts, but it does not appear to do anything. I put browser.$('body2').click(); directly afterwards to see the effect (or lack thereof). It works in the REPL, but not during the actual execution.
1 reply
Sumit Basra
@sumitbasra
args: ['--start-fullscreen'] - using this but on a windows machine, it does not work. Changing it to args: ['--window-size=1920,1080'] works. Can someone please explain why --start-fullscreen works on mac and not on windows?
ricardgarcia
@ricardgarcia
hello all! is there any option to add a header in a browser request using webdriverio?
I've seen so far the webdriver "headers" but it does only apply to selenium requests. I would need the same for a browser url
many thanks!!
Kevin Lamping
@klamping
@ricardgarcia you can set cookies/session data... would that work?
I've done that to set an auth token in the request
ricardgarcia
@ricardgarcia
hi @klamping , could you share an example please?
Kevin Lamping
@klamping
Yep, something like this:
const token = browser.call(() => {
    return global.api.getAuthToken(user);
});

// load the base page so we can set the token
browser.url('./');

// inject the auth token
browser.execute((browserToken) => {
    window.localStorage.setItem('id_token', browserToken);
}, token);
global.api is just an API interface I set up
Basically, I get the auth token via an API call, then set it via localStorage
ricardgarcia
@ricardgarcia
should I do it once to keep my new header for all browser requests? or every time before a browser.url call ?
Kevin Lamping
@klamping
I think it has to be once per session
ricardgarcia
@ricardgarcia
good, I am gonna try and come back :-)
Kevin Lamping
@klamping
So once you set the token, it's good for that URL for the rest of the test. But because WDIO restarts the browser each test file/session, you have to reset the token
ricardgarcia
@ricardgarcia
it is not a token actually, it is an extra header I want to add
Kevin Lamping
@klamping
What's the header?
ricardgarcia
@ricardgarcia
well we are migrating some backend infrastructure in the company and I have currently same domain url environment for two different infrastructures
if I want to point to the new one, I have to add a new key (e.g: "headerName") in the header with value = test
Kevin Lamping
@klamping
I see
ricardgarcia
@ricardgarcia
browser.execute(() => { window.localStorage.setItem('newHeader', "test"); });
Kevin Lamping
@klamping
I believe cookies are always sent to the server with every request
I'm not sure my solution is going to work for you
ricardgarcia
@ricardgarcia
would this work?
ouch
Kevin Lamping
@klamping
Now that I read more about it, seems nothing in local storage is sent automatically
the reason my solution worked for me is that the JS on the page reads from local storage to get the key
https://javascript.info/cookie
"the browser automatically adds stored cookies to (almost) every request to the same domain using Cookie HTTP-header."
So it'll send using cookies, but not sure that'll work unless the server is looking at that Cookie header
ricardgarcia
@ricardgarcia
i dont think the server looks at it... only checks the request headers
Kevin Lamping
@klamping
you would set that in your wdio.conf.js file
Give that a shot... I'm pretty hopeful it'll work for you
ricardgarcia
@ricardgarcia
I've read that this headers only applies for requests sent to selenium server... not the ones for the browser
Kevin Lamping
@klamping
Oh darn
Maybe take a look at the new network mocks functionality: https://webdriver.io/blog/2020/07/10/network-primitives.html
although that seems to be more about recieving data from the server, versus sending it to the server