Rayrun
← Back to Discord Forum

locator.click: Target closed

In our CI environment in GitHub, when I click a element which closes the page, I get locator.click: Target closed error. This happens on only when running the GitHub actions and I can not reproduce the problem locally. The page is static html webpage (https://github.com/MarketSquare/robotframework-browser/blob/main/node/dynamic-test-app/static/popups/first_popup.html) , for testing our library built on top of the Playwright. I have seen the problem report in here: https://github.com/microsoft/playwright/issues/13090 and I am looking what would be the best way to overcome the problem? I can catch the error, as suggested in the issue, but I am wondering is there better way and what that might be?

This thread is trying to answer question "What would be the best way to overcome the 'Target closed' error when using locator.click in a CI environment on GitHub?"

0 replies
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].