This thread is trying to answer question "Is it a good approach to use an 'expect' function to ensure a tab is visible before clicking it, or is there a better way?"
Hi, the expect is not needed. The click itself will only succeed if the tab is visible (or becomes visible within the action timeout), see: https://playwright.dev/python/docs/actionability
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].