Thanks a lot for this ... FYI now seeing toHaveUrlContaining() is now added to wdio expect
@abdurrahim3819
3 жыл бұрын
toHaveUrlContaining method is now added.
@ЕвгенийСинёнков
3 жыл бұрын
Thanks, was very usefull.
@cibelless510
3 жыл бұрын
Guys, there are some changes now - We can use both but need to import CHAI as bellow If you wanted to use both Chai and expect-webdriverio in the same file you would keep the Chai import and expect would default to the expect-webdriverio assertion, e.g.: // myfile.js const expectChai = require('chai').expect; // need to use this for CHAI describe('Element', () => { it('should be displayed', () => { const isDisplayed = browser.$("#element").isDisplayed() expectChai(isDisplayed).to.equal(true); // Chai assertion }); }); describe('Other element', () => { it('should not be displayed', () => { expect(browser.$("#element")).not.toBeDisplayed(); // expect-webdriverio assertion }); }); === check new docs webdriver.io/docs/assertion/
@carlosdelaflor2548
3 жыл бұрын
This worked for me so well. Thank you very much Vinicius!!
@juliabatsheva5785
Жыл бұрын
Thank you so much!
@rifkykurniawan9905
2 ай бұрын
After import chai package, it show this error : Error: Unable to load spec files quite likely because they rely on `browser` object that is not fully initialized. `browser` object has only `capabilities` and some flags like `isMobile` i try to run wdio to automate the react native mobile (android) can someone help me
@JagjeetSingh-pe7ow
4 жыл бұрын
Great content, quick question - Why did we remove './test/helpers/common.js' from the wdio config file during babel setup?
@sdetunicorns
4 жыл бұрын
To get tests to work with ES6+, you only need '@babel/register' in your mocha opts. There were some discussion to remove that line in Webdriverio gitter chat community back in 2017, but I guess they never did in the official docs. If you want, you can read more about Babel setup in the Mocha docs here - mochajs.org/
@BoredThatsWhy
Жыл бұрын
All worked but up until babel install and then @11:30 final run I got this error: " the given combination of arguments (promise and string) is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a string "
@sdetunicorns
Жыл бұрын
In you assertion's arguments, make sure to use `await` keyword so that the promise gets resolved.
@stith_pragya
3 жыл бұрын
Thanks You Automation Bro.....1 query here... your name is like an Indian(Hindu) but your way of speaking english is like foreigner..?
@sdetunicorns
3 жыл бұрын
Hi Tushar, yes I'm Indian but I've been living in Canada for past 10 years.
@yashpandey8391
3 жыл бұрын
can you add a video for typescript set up as well
@sheikmunnisha8010
3 жыл бұрын
after babel setup also i am getting same isuue sir(SyntaxError: Cannot use import statement outside a module)
@priyankasakhare9944
3 жыл бұрын
same here. Can someone help us to resolve?
@sdetunicorns
3 жыл бұрын
Hi, make sure you have all the necessary dependencies installed and have update babel.config.js as well as the wdio.conf.js file. You can read more about it in the documentation here - webdriver.io/docs/babel.html Also, you can compare your configuration code with mine - github.com/automationbro/webdriverio-tutorial
@priyankasakhare9944
3 жыл бұрын
@@sdetunicorns Thanks for reply. I tried above steps, but no luck. However I found this- beta.webdriver.io/docs/babel.html I added .babelrc instead babel.config.js and updated wdio.conf.js under mochaOpts as below- mochaOpts: { ui: 'bdd', timeout: 60000, compilers: ['js:babel-core/register'], require: ['@babel/register'] }, import statements are working with this. Also if you are using Page Model Object , we need to add .babelrc under page directory.
@vvp726
2 жыл бұрын
I get an error: ERROR @wdio/local-runner: Failed launching test session: RequestError: read ECONNRESET please, help!
@sdetunicorns
2 жыл бұрын
this seems to be an issue with your wdio.conf.js file
@shwetamahajan3731
2 жыл бұрын
i am getting this error: "Unable to load spec files quite likely because they rely on `browser` object that is not fully initialised. `browser` object has only `capabilities` and some flags like `isMobile`." plz help
@sdetunicorns
2 жыл бұрын
this usually happens when you enter something wrong in your config file.. make sure your config file is correct. You can compare with this one - github.com/automationbro/webdriverio-tutorial
@SanjayYadav-rw4hv
4 жыл бұрын
Hey Bro... Brother please create a video of what is browser.debug? And Utlities of getElement $ and getElementList!! $$
@sdetunicorns
4 жыл бұрын
Sure, will probably create one in the future, although, the docs explains it quite well - webdriver.io/docs/api/browser/debug.html. Also, I already have a video on $ vs $$ - kzitem.info/news/bejne/2piJu2uGq4mhmqw
@SanjayYadav-rw4hv
4 жыл бұрын
@@sdetunicorns thank you so much bro !!! U r awesome!! 👍
Пікірлер: 25