How To Handle Frames And Windows | Playwright With TypeScript Tutorial ๐ŸŽญ| Part VI | LambdaTest
LambdaTest LambdaTest
26.8K subscribers
5,884 views
0

 Published On Premiered Jul 6, 2022

Learn how to interact with multiple frames and windows in Playwright with the help of live examples.
Start FREE Testing: https://accounts.lambdatest.com/regis...

In this Part VI of the Playwright tutorial series, ๐™†๐™ค๐™ช๐™จ๐™๐™ž๐™  ๐˜พ๐™๐™–๐™ฉ๐™ฉ๐™š๐™ง๐™Ÿ๐™š๐™š, Content Creator at LetCode (@Koushik_chat) talks about handling frames and windows in Playwright. Further, he discusses different types of frames, parent frames, nested frames, windows, and multiple windows, and demonstrates how to interact with them with live examples.

๐Ÿ”น ๐‘พ๐’‰๐’‚๐’• ๐’Š๐’” ๐’‚ ๐’‡๐’“๐’‚๐’Ž๐’† ๐’Š๐’ ๐‘ท๐’๐’‚๐’š๐’˜๐’“๐’Š๐’ˆ๐’‰๐’•?
โžก A frame is an iFrame that is part of a page. The frame can let you create a new experience inside the page. These new experiences are then accessible through interactions with the page. Each page has a main frame, and page-level interactions are assumed to occur within it. Additional frames can be added to a page using the iframe HTML tag.

๐Ÿ”น ๐‘ฏ๐’๐’˜ ๐’•๐’ ๐’‰๐’‚๐’๐’…๐’๐’† ๐’‡๐’“๐’‚๐’Ž๐’†๐’” ๐’Š๐’ ๐‘ท๐’๐’‚๐’š๐’˜๐’“๐’Š๐’ˆ๐’‰๐’•?
โžก The page.frame API can be used to access frame objects, and when testing iFrame, we can use the frameLocator to retrieve the iFrame and locate elements within it.

๐Ÿ”น ๐‘ฏ๐’๐’˜ ๐’•๐’ ๐’‰๐’‚๐’๐’…๐’๐’† ๐’˜๐’Š๐’๐’…๐’๐’˜๐’” ๐’Š๐’ ๐‘ท๐’๐’‚๐’š๐’˜๐’“๐’Š๐’ˆ๐’‰๐’•?
โžก Window handling in Playwright is simple. Using the expect_page method, we can act on a new window or wait for it to load. Once present, we can use Playwright's assertion library to ensure that our user journey is successful.

๏ผถษชแด…แด‡แด ๏ผฃสœแด€แด˜แด›แด‡ส€๊œฑ ๐Ÿ‘€
0:00 Introduction to Frames and Windows
0:20 Frames
2:20 Number of frames
5:20 Interact with frames
12:00 frameLocator function
15:00 Nested frame
19:00 Handling tabs
24:40 Handling multiple tabs
29:00 Wait for load state
35:25 Recap

๐Ÿ“Œ๐‘จ๐’๐’”๐’, ๐’๐’†๐’‚๐’“๐’ ๐Ÿ“ƒ
๐Ÿ”ธ What is a frame in playwright?
๐Ÿ”ธ How do you handle a frame in a playwright?
๐Ÿ”ธ How do you handle windows in a Playwright?

๐Ÿ“Œ ๐‘ฎ๐’Š๐’•๐‘ฏ๐’–๐’ƒ ๐‘ณ๐’Š๐’๐’Œ: https://github.com/ortoniKC/playwrigh...

*๐‘ช๐’๐’Ž๐’‘๐’๐’†๐’•๐’† ๐‘ท๐’๐’‚๐’š๐’๐’Š๐’”๐’•*
โœ”๏ธ How To Setup Playwright Test Automation Framework: https://bit.ly/3MPy1i0
โœ”๏ธ How To Use Functions And Selectors: https://bit.ly/39s5XUm
โœ”๏ธ Playwright Testing Features: https://bit.ly/3u47y9W
โœ”๏ธ How To Handle Inputs And Buttons In Playwright: https://bit.ly/3Ac2oMU
โœ”๏ธ How To Handle Alerts And Dropdowns In Playwright: https://bit.ly/3Ayi11v

*๐‘น๐’†๐’๐’‚๐’•๐’†๐’… ๐‘ฉ๐’๐’๐’ˆ๐’” & ๐‘ซ๐’๐’„๐’”*
๐Ÿ”น Playwright Tutorial: Getting Started With Playwright Framework: https://bit.ly/3AgQP74
๐Ÿ”น How To Run Playwright Tests On LambdaTest Platform: https://bit.ly/3t5w0XI
๐Ÿ”น Run Your First Playwright Test On LambdaTest Platform: https://bit.ly/3x1jRWi
๐Ÿ”น How To Run Playwright Tests In Parallel: https://bit.ly/3GyRORe
๐Ÿ”น Running Playwright Tests In CI/CD: https://bit.ly/3GzDs3d

Sign Up for LambdaTest! Itโ€™s FREE ๐Ÿ™Œ
Perform scalable and reliable cross-browser compatibility testing of your website and web app on the latest mobile and desktop browsers: https://accounts.lambdatest.com/regis...

๐‘น๐’–๐’ ๐’š๐’๐’–๐’“ ๐‘ท๐’๐’‚๐’š๐’˜๐’“๐’Š๐’ˆ๐’‰๐’• ๐’•๐’†๐’”๐’• ๐’”๐’„๐’“๐’Š๐’‘๐’•๐’” ๐’Š๐’๐’”๐’•๐’‚๐’๐’•๐’๐’š ๐’๐’ ๐Ÿ“๐ŸŽ+ ๐’ƒ๐’“๐’๐’˜๐’”๐’†๐’“ ๐’‚๐’๐’… ๐‘ถ๐‘บ ๐’„๐’๐’Ž๐’ƒ๐’Š๐’๐’‚๐’•๐’Š๐’๐’๐’” ๐’–๐’”๐’Š๐’๐’ˆ ๐’•๐’‰๐’† ๐‘ณ๐’‚๐’Ž๐’ƒ๐’…๐’‚๐‘ป๐’†๐’”๐’• ๐’„๐’๐’๐’–๐’…. ๐‘ฌ๐’™๐’†๐’„๐’–๐’•๐’† ๐‘ท๐’๐’‚๐’š๐’˜๐’“๐’Š๐’ˆ๐’‰๐’• ๐’•๐’†๐’”๐’•๐’Š๐’๐’ˆ ๐’Š๐’ ๐’‘๐’‚๐’“๐’‚๐’๐’๐’†๐’ ๐’‚๐’๐’… ๐’„๐’–๐’• ๐’…๐’๐’˜๐’ ๐’š๐’๐’–๐’“ ๐’•๐’†๐’”๐’• ๐’†๐’™๐’†๐’„๐’–๐’•๐’Š๐’๐’ ๐’•๐’Š๐’Ž๐’† ๐’ƒ๐’š ๐’Ž๐’–๐’๐’•๐’Š๐’‘๐’๐’† ๐’‡๐’๐’๐’…๐’”. ๐‘ฒ๐’๐’๐’˜ ๐’Ž๐’๐’“๐’†: https://bit.ly/3avWLhF

Register Now to Avail Bonanza Offerings ๐Ÿ’Ž
+ Test websites and web apps on 3000+ real browsers over LambdaTest cloud
+ Trusted By 1M+ users, 500+ enterprises and 130+ countries
+ Online scalable Selenium Grid to perform Manual as well as Automation Testing
+ 100 minutes of free Web + Mobile Automation Testing
+ 60 minutes of free Live Interactive Testing per month
+ 10 Screenshot Tests per month
+ 10 Responsive Tests per month (Test a page across 50+ Device configurations with a single click)
+ Unlimited free testing on LT Browser

For questions: [email protected] ๐Ÿ˜ƒ

*๐‘ฌ๐’™๐’‘๐’๐’๐’“๐’†*
๐ŸŽฌ Most Recent Videos: https://bit.ly/3kUUeAQ
๐ŸŽ“ Learning Hub: https://bit.ly/3fr6l4Z
๐ŸŽฅ LambdaTest Customers: https://bit.ly/2TB7pvD
๐Ÿš€ Webinars: https://bit.ly/37i41co
๐Ÿ› ๏ธ Product Updates: https://bit.ly/3717NGO
๐Ÿ’ฌ LambdaTest Certifications: https://bit.ly/3x4EtcY

*๐‘บ๐’๐’„๐’Š๐’‚๐’*
๐Ÿ“ BLOG: https://bit.ly/3yGVsUc
๐Ÿ‘ฅ COMMUNITY: https://bit.ly/3Aiz5oO
๐Ÿ”ด NEWSLETTER: https://bit.ly/3juhxzc
๐Ÿ–ผ๏ธ GITHUB: https://bit.ly/3jowfYs
๐Ÿ› ๏ธ YOUTUBE: https://bit.ly/3rH2Yfh
๐ŸŒŽ LINKEDIN: https://bit.ly/3xA6F84
๐Ÿ‘ฅ FACEBOOK: https://bit.ly/37mbQOa
๐ŸฆTWITTER: https://bit.ly/3Cn0g3A
๐Ÿ“ธ PINTEREST: https://bit.ly/2VCXI05

#playwrighttutorial #playwrighttesting #lambdatesttutorial #playwrightautomation #playwright #microsoftplaywright #playwrightframework #playwrightiframe

Disclaimer:
This video features materials protected by the Fair Use guidelines of Section 107 of the Copyright Act. All rights reserved to ยฉ 2022 LambdaTest. Any illegal reproduction of this content will result in immediate legal action.

show more

Share/Embed