Back to Browse

How To Use Functions And Selectors | Playwright With TypeScript Tutorial ๐ŸŽญ| Part 2

22.9K views
Premiered Jun 7, 2022
25:38

Watch this video to learn how to write a basic script with Playwright using functions & selectors and then launch the browser to execute the test. Start FREE Testing: https://accounts.lambdatest.com/register?utm_source=youtube&utm_medium=Organic&utm_campaign=Jun22&utm_term=UWeXnulWfJs&utm_content=LT_Sign_Up In this Part-II of the Playwright tutorial series, ๐™†๐™ค๐™ช๐™จ๐™๐™ž๐™  ๐˜พ๐™๐™–๐™ฉ๐™ฉ๐™š๐™ง๐™Ÿ๐™š๐™š, Content Creator at LetCode (@Koushik_chat) walks you through the basics of a few playwright functions. He further demonstrates how to write a login script with Typescript and execute it using Playwright functions and selectors. Finally, he concludes the video by explaining the concepts of BrowserContext and Page. ๐Ÿ”น ๐‘พ๐’‰๐’‚๐’• ๐’‚๐’“๐’† ๐‘ท๐’๐’‚๐’š๐’˜๐’“๐’Š๐’ˆ๐’‰๐’• ๐‘ญ๐’–๐’๐’„๐’•๐’Š๐’๐’๐’”? โžก Following are some popular Playwright functions: 1. goto - It is used to navigate to a site. 2. hover - It helps to perform the mouse hover action. 3. click - With this function, you can click on any element. 4. fill - It helps to send test data. 5. waitForTimeout - It is similar to thread.sleep. ๐Ÿ”น ๐‘พ๐’‰๐’‚๐’• ๐’‚๐’“๐’† ๐‘ท๐’๐’‚๐’š๐’˜๐’“๐’Š๐’ˆ๐’‰๐’• ๐‘บ๐’†๐’๐’†๐’„๐’•๐’๐’“๐’”? โžก Selectors are strings used to generate locators. Locators are used to perform actions on elements using methods like locator.click([options]), locator.fill(value[, options]), and others. ๐Ÿ”น ๐‘พ๐’‰๐’‚๐’• ๐’‚๐’“๐’† ๐‘ฉ๐’“๐’๐’˜๐’”๐’†๐’“๐‘ช๐’๐’๐’•๐’†๐’™๐’• ๐’‚๐’๐’… ๐‘ท๐’‚๐’ˆ๐’†๐’”? โžก BrowserContext: BrowserContext allows you to run multiple independent browser sessions. If a page opens another page, such as with a window.open call, the popup will be in the browser context of the parent page. โžก Pages: A BrowserContext may contain multiple pages. A page is a single tab or popup window within the context of a browser. It is intended to navigate URLs and interact with page content. ๏ผถษชแด…แด‡แด ๏ผฃสœแด€แด˜แด›แด‡ส€๊œฑ ๐Ÿ‘€ 00:00 Introduction 00:04 Modules 01:50 How to launch the Chromium browser using Playwright? 02:00 Test Block in Playwright 05:45 Playwright Functions 07:04 How to write a Login script? 07:43 Playwright Selectors 11:33 How to execute the script? 20:14 Understanding Context and New Page Concepts 24:18 Recap 25:06 Conclusion ๐Ÿ“ŒAlso, learn ๐Ÿ“ƒ ๐Ÿ”ธ How do I launch a browser in Playwright? ๐Ÿ”ธ What browsers does the Playwright support? ๐Ÿ”ธ What is the Playwright test? ๐Ÿ”ธ How do you install a Playwright test? ๐Ÿ“Œ ๐‘ฎ๐’Š๐’•๐‘ฏ๐’–๐’ƒ ๐‘ณ๐’Š๐’๐’Œ: https://github.com/ortoniKC/playwright-ts-lambdatest **๐‘ผ๐’”๐’†๐’‡๐’–๐’ ๐‘ซ๐’๐’„๐’”** ๐Ÿ”น How To Run Playwright Tests On TestMu AI Platform: https://bit.ly/3t5w0XI ๐Ÿ”น Run Your First Playwright Test On TestMu AI Platform: https://bit.ly/3x1jRWi ๐Ÿ”น How To Run Playwright Tests In Parallel: https://bit.ly/3GyRORe ๐Ÿ”น Test Execution Setup: https://bit.ly/3PONYYp ๐Ÿ”น Run Local Tests Using Playwright: https://bit.ly/3z6jc7q Sign Up for TestMu AI! 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/register?utm_source=youtube&utm_medium=Organic&utm_campaign=Jun22&utm_term=UWeXnulWfJs&utm_content=LT_Sign_Up_1 ๐‘น๐’–๐’ ๐’š๐’๐’–๐’“ ๐‘ท๐’๐’‚๐’š๐’˜๐’“๐’Š๐’ˆ๐’‰๐’• ๐’•๐’†๐’”๐’• ๐’”๐’„๐’“๐’Š๐’‘๐’•๐’” ๐’Š๐’๐’”๐’•๐’‚๐’๐’•๐’๐’š ๐’๐’ ๐Ÿ“๐ŸŽ+ ๐’ƒ๐’“๐’๐’˜๐’”๐’†๐’“ ๐’‚๐’๐’… ๐‘ถ๐‘บ ๐’„๐’๐’Ž๐’ƒ๐’Š๐’๐’‚๐’•๐’Š๐’๐’๐’” ๐’–๐’”๐’Š๐’๐’ˆ ๐’•๐’‰๐’† ๐‘ณ๐’‚๐’Ž๐’ƒ๐’…๐’‚๐‘ป๐’†๐’”๐’• ๐’„๐’๐’๐’–๐’…. ๐‘ฌ๐’™๐’†๐’„๐’–๐’•๐’† ๐‘ท๐’๐’‚๐’š๐’˜๐’“๐’Š๐’ˆ๐’‰๐’• ๐’•๐’†๐’”๐’•๐’Š๐’๐’ˆ ๐’Š๐’ ๐’‘๐’‚๐’“๐’‚๐’๐’๐’†๐’ ๐’‚๐’๐’… ๐’„๐’–๐’• ๐’…๐’๐’˜๐’ ๐’š๐’๐’–๐’“ ๐’•๐’†๐’”๐’• ๐’†๐’™๐’†๐’„๐’–๐’•๐’Š๐’๐’ ๐’•๐’Š๐’Ž๐’† ๐’ƒ๐’š ๐’Ž๐’–๐’๐’•๐’Š๐’‘๐’๐’† ๐’‡๐’๐’๐’…๐’”. ๐‘ฒ๐’๐’๐’˜ ๐’Ž๐’๐’“๐’†: https://bit.ly/3avWLhF Register Now to Avail Bonanza Offerings ๐Ÿ’Ž + Test websites and web apps on 3000+ real browsers over TestMu AI 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 ๐ŸŽฅ TestMu AI Customers: https://bit.ly/2TB7pvD ๐Ÿš€ Webinars: https://bit.ly/37i41co ๐Ÿ› ๏ธ Product Updates: https://bit.ly/3717NGO ๐Ÿ’ฌ TestMu AI 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 #playwrightselectors #playwrightautomation #playwright #microsoftplaywright #playwrightautomationtutorial #playwrightframework #playwrighttestingtool Disclaimer: This video features materials protected by the Fair Use guidelines of Section 107 of the Copyright Act. All rights reserved to ยฉ 2022 TestMu AI. Any illegal reproduction of this content will result in immediate legal action.

Download

1 formats

Video Formats

360pmp452.1 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

How To Use Functions And Selectors | Playwright With TypeScript Tutorial ๐ŸŽญ| Part 2 | NatokHD