Rayrun
← Back to Discord Forum

Playwright.Click() failing with very specific nested elements, mainly with Record on in --debug

So we have a very specific weird bug with clicking an element with Playwright. It is a "Selectable Tile" component which basically consists of a label containing a hidden input=radio field and a styled sibling div.

That styled div contains a svg and a span. When I run the tests normally it works, yet for a colleague the click event fails. When I run the tests in --debug and select record, then I can suddenly recreate the error.

A painful evening of testing and tracing learned me that when I have just the svg or just the span, everything works fine. Having two svg or two span also works fine. Reducing just the viewbox property (not the widht/height) of the SVG also works.

Any clues as to what is going on here?

This thread is trying to answer question "Why does the Playwright.Click() function fail when clicking on a specific element containing both an 'svg' and a 'span'?"

1 reply

Related Discord Threads

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