Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:33
    praveendvd commented #7532
  • 00:31
    praveendvd commented #7572
  • 00:08
    praveendvd commented #7572
  • Oct 25 22:35
    christian-bromann edited #7530
  • Oct 25 22:32
    christian-bromann closed #7545
  • Oct 25 22:32
    christian-bromann commented #7545
  • Oct 25 22:30
    christian-bromann closed #7506
  • Oct 25 22:30

    christian-bromann on main

    add more expect-webdriverio doc… (compare)

  • Oct 25 22:21
    christian-bromann commented #7506
  • Oct 25 22:18

    christian-bromann on main

    fix unit tests (compare)

  • Oct 25 22:13
    christian-bromann closed #7553
  • Oct 25 22:13
    christian-bromann commented #7553
  • Oct 25 22:13
    christian-bromann labeled #7530
  • Oct 25 22:12
    christian-bromann edited #7530
  • Oct 25 22:05

    christian-bromann on main

    roll back to @tsconfig/node12 (compare)

  • Oct 25 21:59
    christian-bromann synchronize #7593
  • Oct 25 21:59

    christian-bromann on cb-enable-setValue-in-onPrepare

    fix running setValue in onPrepa… (compare)

  • Oct 25 21:53
    christian-bromann closed #7557
  • Oct 25 21:53
    christian-bromann commented #7557
  • Oct 25 21:52
    christian-bromann commented #7550
nonamecze
@nonamecze:matrix.org
[m]
hi, im currently having trouble with this error
can someone help me please?
sureshneni
@sureshneni

image.png
image.png

@nonamecze:matrix.org use require to import page file to spec class like shown below

const loginPage = require('../pageobjects/login.po')
Christian Bromann
@christian-bromann
or integrate Babel https://webdriver.io/docs/babel
1 reply
Ghost
@ghost~607dccd16da03739847a82b3
Hello everyone! Pls, help me! I'm newbee in js and WebdriverIO!
In some test I have to use chrome extension, but I don't know how to start browser with my extension. I try to add path to extension in wdio.conf.js like
'goog:chromeOptions' : {
args: [ "--load-extension=e2e/path/to/extension.crx"]
}
but there was no extension in browser.
Guna Reddiar
@sreddiar
Hello Everyone, Had a question about ios & Android Automation, if we are using the same Page Object class, what is the best way to define ios and android locators with the same variable name, to make the code more reusable
Christian Bromann
@christian-bromann
@sreddiar every getter can check an environment variable/flag and use a locator for iOS or for Android depending on its result
sureshneni
@sureshneni

Hi Team, I have used below block to run my multiple specs in sequential order but browser gettitng open twice at same times, please let me know how to fix it.

@sureshneni login.spec.js should contain all of your tests to test that login works. For instance, what happens if you enter valid credentials. What about an empty password, what about empty username?

However, openNewAccount.spec.js isn't testing login, but perhaps it requires you to be logged in first. If that's the case, you can make the spec files independent of one another. Make sure openNewAccount.spec.js doesn't depend on login.spec.js. Hope this helps.

@jamesmortensen got it, thank you

@jamesmortensen so login is common for all my specs, so do I need to keep login login in all my sepc files, if yes code is duplicate rt? what would be the better way

Henrik Andersson
@perhenrikandersson
Is it possible to make a test not run in parallel? I usually run all my tests in parallel using suites but I have one test that can interfere with other tests so I would like to make sure this test don't run at the same time as other tests.
Christian Bromann
@christian-bromann
16 replies
nekkantisandeep
@nekkantisandeep
HI ALL, we don't know how to use browser.mock() exactly could anyone please provide suggestion , ex: I want to change the status of 200 as 500 service unavailable for "https://www.google.com/" , we tried by visiting the "https://webdriver.io/docs/mocksandspies/" but didn't work any help will be appreciable
exampleCode: const strictMock = browser.mock('https://www.google.com/', {
statusCode: 500
})
Erwin Heitzman
@erwinheitzman
@nekkantisandeep maybe add the method and a response
const mock = browser.mock('https://todo-backend-express-knex.herokuapp.com/', {
    method: 'get'
})

mock.respond([
  {
    statusCode: 500
   }
])
1 reply
something like that
Christoph Herold
@coeamyd
Any ideas on getting the console messages from Chrome?
Erwin Heitzman
@erwinheitzman
@coeamyd setting the outputDir probably does what you need
23 replies
Christoph Herold
@coeamyd
@erwinheitzman Thanks, I'll try it out.
kevin-longmate
@kevin-longmate
Got a weird problem trying to upgrade the webdriver 7.4.6 - in my wdio.conf.ts I'm getting a Cannot find namespace 'WebdriverIO'. message in the terminal 'problems' section, along with several others like Cannot find name 'browser' however when I open /node_modules/webdriverio/sync.d.ts in visual studio the errors disappear
1 reply
anyone know why that might be? Seems like it's ignoring that file unless I have it open in the editor
Christian Bromann
@christian-bromann
@kevin-longmate from which version did you update? if you use vscode, have you tried restarting it? That usually solves it for me
kevin-longmate
@kevin-longmate
@christian-bromann I'm going from 6.4.0 to 7.4.6, have tried restarting VS code as well as the computer, no luck with either unfortunately!
James
@jamesmortensen

Hi Team, I have used below block to run my multiple specs in sequential order but browser gettitng open twice at same times, please let me know how to fix it.

@sureshneni login.spec.js should contain all of your tests to test that login works. For instance, what happens if you enter valid credentials. What about an empty password, what about empty username?

However, openNewAccount.spec.js isn't testing login, but perhaps it requires you to be logged in first. If that's the case, you can make the spec files independent of one another. Make sure openNewAccount.spec.js doesn't depend on login.spec.js. Hope this helps.

@jamesmortensen got it, thank you

@jamesmortensen so login is common for all my specs, so do I need to keep login login in all my sepc files, if yes code is duplicate rt? what would be the better way

@sureshneni The code which you use to communicate with the browser to login can go in a page object. The same page object can then be reused by any spec that needs to first login. For example:

it('should check for new messages for the user', () => {
    loginPage.doLogin(username, password);

    // do the rest of the steps here for the test
});

In this example, you're reusing the code by putting it in a method that can be called repeatedly, so no duplicate code. Hope this helps.

sureshneni
@sureshneni
@jamesmortensen got it, thank you
Iqra Dilawar
@iqra-dilawar
@christian-bromann Hi, I wanted to know that can we automate kafka callbacks? Where we are not sure when will we receive response. If yes, what can be the way
4 replies
Jverrijk
@Jverrijk
image.png
I'm having trouble selecting a dynamically generated frame within a front-end checkout test. It consists of multiple frames where client information must be filled in. All goes well except the final one. I've tried so many things. In the inspector of Chrome you can see a #document is created in an iFrame, I'm unable to add a value to id="addressCollector-date_of_birth". Webdriver keeps telling me the frame doesn't exist.
Raziel Alron
@razielron
Coder123
@Coder123-Sai
Hiii
I am trying to login to GMAIL using WebdriverIO, but getting error
This browser or app may not be secure.
Can any one please help how to bypass this error?
Thanks in advance
Daniël Verburgh
@danielkroon
Hi all! I Just saw this notification that we can’t use sync mode anymore. Does that mean we have to rewrite all our tests to async? Or is there a quicker way? I can’t find any more information or documentation online. Just the message that we shouldn’t use sync mode anymore.
Christian Bromann
@christian-bromann
@danielkroon where did you see the message?
Here: https://webdriver.io/docs/sync-vs-async ? Let me add some more links for context. Thanks for letting me know that this is unclear
4 replies
Daniël Verburgh
@danielkroon
@christian-bromann yes in the docs. Thank you very much! No problem!
Christian Bromann
@christian-bromann
@danielkroon added a link to the RFC, hope this provides more context
Daniël Verburgh
@danielkroon
@christian-bromann thank you!
Krishna Kumar Singh
@kwishna
Default Scripts For Cucumber-Typescript Downloaded On Performing 'wdio init' Is Not Running For Me. Please check: https://stackoverflow.com/q/67186996/9544909
ttwu
@ttwu2019
Hi,Who knows this problem?
Ghost
@ghost~607dccd16da03739847a82b3
Hello. I need to execute tests with chrome extension in browser. In java I can do it like this:
ChromeOptions options = new ChromeOptions();
options.addExtensions(new File("app.crx"));
What should I do for it in js and webdriverIO?
ttwu
@ttwu2019
ERROR @wdio/local-runner: Failed launching test session: Error: Couldn't initialise "@wdio/cucumber-framework".
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/formatter/helpers/event_data_collector' is not defined by "exports" in /Users/git/Desktop/192.168.5.66/eviauto_android/node_modules/@cucumber/cucumber/package.json
Christian Bromann
@christian-bromann
@ttwu2019 it seems there is an error in an external dependency
We are working on a fix
Krishna Kumar Singh
@kwishna
@christian-bromann Just 1 Day Back, Everything Was Working Fine. When I Checked, I Came To Conclusion That It Is Possibly Happening Because @cucumber/cucumber v7.2.0, Which Was Released Yesterday. On @cucumber/cucumber v7.1.0, The Same Code Is Working Fine.
Christian Bromann
@christian-bromann
Yes excactly. .. we will from now on pin the cucumber versions .. this has happened for the second time now
Federico Francia
@federicoitaly:matrix.org
[m]
Hi, after upgrading from wdio6 to wdio7 I get this error: ERROR @wdio/local-runner: Failed launching test session: Error: Couldn't initialise "@wdio/cucumber-framework".
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/formatter/helpers/event_data_collector' is not defined by "exports" in /Users/federicof/Documents/Automation/Mobile/WMobileBDD/node_modules/@cucumber/cucumber/package.json