Page Object Model In Playwright With JavaScript

  Рет қаралды 6,460

Mukesh otwani

Mukesh otwani

6 ай бұрын

This video will help you to give understanding of the powerful Page Object Model (POM) design pattern! If you're looking to enhance your automation testing skills and make your Playwright scripts more robust and maintainable then you should consider page object model
In this video, we'll cover:
Introduction to Page Object Model (POM) and its importance in test automation.
How To Implement Page Objects in Playwright to structure your code for maximum reusability.
Best practices for creating scalable and maintainable automation scripts.
Navigating through real-world examples to demonstrate the effectiveness of POM in Playwright.
References
playwright.dev/docs/pom
Playwright Series - • Playwright Tutorials F...
Subscribe and Stay Updated:
Don't forget to subscribe for more insightful tutorials on Playwright, testing strategies. Hit the bell icon to receive notifications whenever we release new content!
Connect with us:
Email - mukeshotwani@learn-automation.com
Linkedin- / mukesh-otwani-93631b99
Instagram- / mukeshotwaniofficial
Facebook Group- / 256655817858291

Пікірлер: 25
@SelectorsHub
@SelectorsHub 6 ай бұрын
Very well explained. Thank you for this tutorial Mukesh.
@Mukeshotwani
@Mukeshotwani 5 ай бұрын
So nice of you
@ashutoshpratapsingh6872
@ashutoshpratapsingh6872 6 ай бұрын
Good explanation and please design with Cucumber as well in future, will wait for that
@ashutoshpratapsingh6872
@ashutoshpratapsingh6872 6 ай бұрын
Thanks for highlighting my comment
@venkatsubramaniyan2385
@venkatsubramaniyan2385 6 күн бұрын
Thank you so much for the detailed explanation!! I've one doubt that whether its fine to do assertion at the page level?
@Mukeshotwani
@Mukeshotwani 4 күн бұрын
Page should have locators and action. Assertion should be at test.
@luckytima2315
@luckytima2315 4 ай бұрын
Thank you very much, one of the best videos on this topic
@Mukeshotwani
@Mukeshotwani 4 ай бұрын
Glad it was helpful! Thank you
@rakeshbabuvs
@rakeshbabuvs 5 ай бұрын
Superb Mukesh bro😊 step by step and easy to follow ❤
@Mukeshotwani
@Mukeshotwani 4 ай бұрын
Thank you so much 😀
@andyrockstar78
@andyrockstar78 6 ай бұрын
Nice one Mukeshji
@Snehaandsahasra
@Snehaandsahasra 6 ай бұрын
Thanks Mukesh. In page class methods( for ex in Log in page , can we write directly this.username.fill(username) instead of this.page.fill(this.username, ‘aaa’)? . In Playwright documentation, they used the variables as this.variable instead of this.page.locator(this.variable). Thank you!
@ffgaming-fe3cx
@ffgaming-fe3cx 5 ай бұрын
how to find multiple elements using python? which locator or selector should i need?
@Mukeshotwani
@Mukeshotwani 5 ай бұрын
You can xpath or css selectors or playwright in build locators for this # Finding multiple elements using XPath elements_xpath = page.query_selector_all('your_xpath_expression') for element in elements_xpath: print(element.text())
@AparnaKompella
@AparnaKompella Ай бұрын
how to keep the browser open which is opened by PlayWright on mac
@Mukeshotwani
@Mukeshotwani Ай бұрын
Its closes automatically everytime
@sindhurabc6857
@sindhurabc6857 6 ай бұрын
if you have any video explaining how to write xpath and css selector in detail, can you please share the link.
@Mukeshotwani
@Mukeshotwani 5 ай бұрын
Hi Sindhu, here is the link kzbin.info/www/bejne/d6SaY6Bvptd0h5o&pp=ygUnaG93IHRvIHdyaXRlIGR5bmFtaWMgeHBhdGggaW4gc2VsZW5pdW0g
@sindhurabc6857
@sindhurabc6857 5 ай бұрын
​@@Mukeshotwanithank you so much Mukesh
@user-hm5eo1qj5t
@user-hm5eo1qj5t 5 ай бұрын
Can you please do an episode of Playwright automated test by using test data from a database
@Mukeshotwani
@Mukeshotwani 5 ай бұрын
Sure as of now this guide will help medium.com/@Amr.sa/managing-database-integration-with-playwright-4b7484e98615
@HabibUllah-jo7vm
@HabibUllah-jo7vm 6 ай бұрын
kindly add custom commands in the playwright typescript.
@AparnaKompella
@AparnaKompella Ай бұрын
and how do i debug in play wright
@Mukeshotwani
@Mukeshotwani Ай бұрын
I have video on debugging in playwrigt please check
@bongtube1983
@bongtube1983 6 ай бұрын
The as-is code shows in this video for the page objects are not working. I had to tweak the code by following PlayWright official documentation to have this working. My working code for page object class of Login Page is as below. I just added an assertion for the login page to check for the logo image. const {expect}=require("@playwright/test") class LoginPage { constructor(page) { this.page=page this.pagelogo=page.locator("div.col-lg-6>img") this.username=page.locator("input#email1") this.password=page.locator("input#password1") this.loginBtn=page.locator("//button[text()='Sign in']") } async login_validation(){ await expect(this.pagelogo).toBeVisible() await this.username.fill("admin@email.com") await this.password.fill("admin@123") await this.loginBtn.click() } } module.exports=LoginPage
How To Push Playwright Test To Github
24:12
Mukesh otwani
Рет қаралды 2,1 М.
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 78 МЛН
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 62 МЛН
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 35 МЛН
Самый Молодой Актёр Без Оскара 😂
00:13
Глеб Рандалайнен
Рет қаралды 11 МЛН
Easiest way | Playwright Page Object Model | Step by Step DEMO
34:10
Automation Step by Step
Рет қаралды 41 М.
You don't need a frontend framework
15:45
Andrew Schmelyun
Рет қаралды 115 М.
Java Is Better Than Rust
42:14
ThePrimeTime
Рет қаралды 158 М.
THIS is Playwrights BEST Feature for Web Automation
9:45
John Watson Rooney
Рет қаралды 40 М.
e2e testing with Playwright | OD111
15:52
Microsoft Developer
Рет қаралды 21 М.
Playwright Interview Questions and Answers
16:36
LetCode with Koushik
Рет қаралды 10 М.
Reuse Playwright  Code across Files and Tests with Fixtures
5:54
Лазер против камеры смартфона
1:01
NEWTONLABS
Рет қаралды 712 М.
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,9 МЛН