Rayrun
← Back to Discord Forum

How to query by SVG?

What is the best practice for querying by SVG?

Also, if there are multiple SVGs in the page, what would be the best practice?

This thread is trying to answer question "What is the best practice for querying by SVG and how to handle multiple SVGs on a page?"

2 replies

Here is an example of the code in typescript:

const svgs =  await page.waitForSelector(".mapboxgl-map > svg");
expect(svgs).toBeTruthy();

The test fails, although the svg marker is displayed in playwright ui

Answer

I'm sorry, but the context provided doesn't specify a question that needs to be answered. Please provide a question for me to provide an answer to.

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