For sure - thanks for watching. 🦝 If you haven't discovered it yet, check out the Playwright Tips Playlist. :) You'll find all our Playwright videos there and there are many more to come. th-cam.com/play/PLMZDRUOi3a8NtMq3PUS5iJc2pee38rurc.html
@checkly what if we have multiple pop-up in our flow. do we need to write addLocatorHandler for each pop-up. Ex: One pop-up having text "give feedback", second pop-up having test "rate-us"
Based on my understanding from the docs, if each pop-up can be located with some kind of general selector or custom attribute for all pop-ups, one handler with some conditions should be enough for both cases.
I haven't tested it but I think it depends. Either you can have multiple `addLocatorHandler` or you generalize the popups to all have the same id or something. Both approaches should work, but generalizing might not always be possible. :) Hope this helps!
I've started to implement this approach in the project to catch random error alerts(but the problem is there can be more than 1 on the page simultaneously). So, probably can you give an idea if it is possible to catch 2+ elements of similar kind? For now I've resolved by catching the first() element. But all - would be much better ))
Hmm, this is a great question that I don't have an answer to right now. But I'll put it on "the investigation list" and there might be a future video about it. :)
Instead of using in individual test, can we use this method in before All/before each or set a listener using page.on and implement this method inside the listener?
Re: "can we use this method in before All/before each" - I didn't test it but this should work. Re: event listener - I'm not sure. Which event listener do you want to use?
This is exactly what I needed for my tests! I’m so excited to implement this.
Right? I've been waiting for a general solution to the "whenever it appears" problem, too. 🎉
Wow your every video on playwright is awesome !
Thank you so much! Happy the videos have been valuable. 😊
Woooha, thanks for your content !
Thank you for watching! 😉
Awesome, thanks. I wish there would be more videos about playwright features. Thank you for investing in to community :)
For sure - thanks for watching. 🦝 If you haven't discovered it yet, check out the Playwright Tips Playlist. :) You'll find all our Playwright videos there and there are many more to come. th-cam.com/play/PLMZDRUOi3a8NtMq3PUS5iJc2pee38rurc.html
Thanks for the valuable content!
Happy to! 😊
Great content! Thank you very much.
Thank you! Great it's been valuable! 😊
Cool new feature and great explanation - thank you!
Love Playwright 😇
Thank you so much! It has solved our pain 🤩
Yay - happy to hear that!
Good stuff. Thanks for another useful video :-).
Thank you! Happy the videos are valuable. 😊
@checkly what if we have multiple pop-up in our flow. do we need to write addLocatorHandler for each pop-up. Ex: One pop-up having text "give feedback", second pop-up having test "rate-us"
Based on my understanding from the docs, if each pop-up can be located with some kind of general selector or custom attribute for all pop-ups, one handler with some conditions should be enough for both cases.
I haven't tested it but I think it depends. Either you can have multiple `addLocatorHandler` or you generalize the popups to all have the same id or something.
Both approaches should work, but generalizing might not always be possible. :)
Hope this helps!
I've started to implement this approach in the project to catch random error alerts(but the problem is there can be more than 1 on the page simultaneously). So, probably can you give an idea if it is possible to catch 2+ elements of similar kind? For now I've resolved by catching the first() element. But all - would be much better ))
Hmm, this is a great question that I don't have an answer to right now. But I'll put it on "the investigation list" and there might be a future video about it. :)
@@ChecklyHQ Many thanks! Will keep an eye on your posts ))
Instead of using in individual test, can we use this method in before All/before each or set a listener using page.on and implement this method inside the listener?
Re: "can we use this method in before All/before each" - I didn't test it but this should work.
Re: event listener - I'm not sure. Which event listener do you want to use?
Yes, It works in beforeEach
that's awesome, playwirght is the best
Totally agreed. 🫣 It gets better with every release. 💪