Playwright selectors in-depth for beginners (with best practices and examples)

  Рет қаралды 13,730

AutomateTogether

AutomateTogether

2 жыл бұрын

An in-depth look at selectors with Playwright for beginners. Consists of a general intro, best practices and practical examples.
Goals:
- Learn how to find & test selectors including
a. CSS selectors
b. XPath selectors
c. Playwright text selectors
- Learn selector best practices to
a. Distinguish between solid and brittle selectors
b. Optimise existing selectors when possible
Resources shown:
- danube-webstore.herokuapp.com
- playwright.dev
- github.com/checkly/headless-r...
Machine specs: MacBook Pro (13-inch, M1, 2020), macOS Big Sur (11.5.2)
Danube credentials: user@email.com / supersecure1
Next steps:
- Try inspecting elements on Danube and coming up with different selectors for the same item. Then test them and verify they work.
- Research CSS selector syntax (XPath can be helpful, too) and try to understand its basic logic.
Additional resources:
- The excellent guide to selectors on Playwright’s official docs: playwright.dev/docs/selectors
- I sometimes post automation threads on Twitter @rag0g (get in touch!)
- My guide on selectors on Checkly’s open-source guides: www.checklyhq.com/learn/headl...

Пікірлер: 14
@peterspencer5112
@peterspencer5112 Жыл бұрын
Noob to CSS Selectors this is best video I've seen on the topic thanks
@shaunregan8088
@shaunregan8088 2 жыл бұрын
Good content. Exactly what I needed. Hopefully you can do the deep dive videos on xpath and css selectors. I’ve liked and subscribed
@Matkotech
@Matkotech 2 жыл бұрын
Awsome content, keep up the good work! 💪
@flaviokonti5522
@flaviokonti5522 2 жыл бұрын
Top explanation 👍
@prasadmadge8895
@prasadmadge8895 2 жыл бұрын
Thanks for the awesome content. It helped allot.
@RockalaCarta
@RockalaCarta 2 жыл бұрын
Excellent!... rock and coding... my passion!
@prewinder
@prewinder Жыл бұрын
Thank you, this was most helpful. Maybe you should turn this into a Udemy-class? You speak clearer than most of their tutors. What is the difference between using headless recorder versus playwrights recorder?
@TristanBailey
@TristanBailey Жыл бұрын
Some good advice on choice of selector for locator but more advice to build app better hocks rather than test better in playwright as title suggests
@Doctor_Frog_9000
@Doctor_Frog_9000 2 жыл бұрын
Is there a way to select one element that has 1. A class name shared by other elements 2.Its text?
@bloodylessy8608
@bloodylessy8608 2 жыл бұрын
Hey ho. Great Video. Exactly what I was looking for so liked and subscripted :). Quick question : What is the best way to deal with some sort of "2 step authentication" (getting an code per email or clicking on a link to verify) I thought about some if/else condition like If "logged-in-page" is loaded within a certain timespan proceed... else print out in Error message "xy". Do you have an elegant solution for this case? (ps I know you could also open your mail acc. with playwright and fetch the needed data out of the arriving email, but on a Clear browser you should run into the same problem logging into your email acc). Best wishes and thank you mate :)
@clifflikovo6836
@clifflikovo6836 Жыл бұрын
😂😂😂😂 where can i get the parry hotter book?
@daddy_eddy
@daddy_eddy 2 жыл бұрын
Store was closed. You need to make new video.
@husseinkaplan
@husseinkaplan 2 жыл бұрын
اهاه
@adejerry6338
@adejerry6338 2 жыл бұрын
hahahah
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 33 МЛН
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,4 МЛН
EVOLUTION OF ICE CREAM 😱 #shorts
00:11
Savage Vlogs
Рет қаралды 4,8 МЛН
Playwright request interception
18:30
AutomateTogether
Рет қаралды 11 М.
The Four Futuristic Features Of Playwright
31:22
Applitools: AI-Powered Test Automation Platform
Рет қаралды 11 М.
Playwright Browser Automation and Testing
45:40
Charles Chen
Рет қаралды 7 М.
Automating a web chat with Playwright
18:18
AutomateTogether
Рет қаралды 1,2 М.
Record Playwright scripts using Codegen
22:40
AutomateTogether
Рет қаралды 3,7 М.
Testing Web Applications with Playwright - Debbie O'Brien - NDC Oslo 2022
50:49
Track Frontend JavaScript errors with Playwright fixtures
8:53
Performance Testing using Playwright
1:05:47
NY Web Performance Meetup
Рет қаралды 18 М.
Stop Writing So Many Tests
10:02
Web Dev Simplified
Рет қаралды 85 М.
Это - iPhone 16 и вот что надо знать...
17:20
Overtake lab
Рет қаралды 132 М.
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
VA-PC
Рет қаралды 2,4 МЛН
iPhone, Galaxy или Pixel? 😎
0:16
serg1us
Рет қаралды 1,3 МЛН