Rayrun
← Back to videos

Locator - Has & Has Text | Playwright Tutorial part - 69

Hey, in this video, we'll learn how to handle dropdown with the playwright locator strategy of has and hasText option.

In this video, Kaushik discusses a real-time scenario where he faced an issue with handling a dropdown in Playwright. He demonstrates how to dynamically handle the dropdown by using locators and using the first or last method to select the desired option. He also shows how to use regular expressions to match the exact text of the option. Kaushik explains that this approach is necessary when dealing with dropdowns that cannot be handled using the regular select method due to properties like area hidden and area disabled. He also mentions a resource for learning more about regular expressions. Overall, the video provides a helpful solution for handling dropdowns in Playwright.

Related Videos

How to handle multiple tabs in Page Object Model | Playwright Tutorial - Part 87
How to handle multiple tabs in Page Object Model | Playwright Tutorial - Part 87
Playwright Installation - 2022
Playwright Installation - 2022
How to download file & attach to report | Playwright Tutorial part - 68
How to download file & attach to report | Playwright Tutorial part - 68
Save Test Execution In Video | Playwright - Part 5
Save Test Execution In Video | Playwright - Part 5
TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].