Rayrun
← Back to Discord Forum

Checking for text/isVisible()

kosmocramerposted in #help-playwright
Open in Discord

Hey guys, how do I filter through <mat-autocomplete> -> <mat-option> and check for "Payments" text here? The Payments section is a dropdown and I need to verify if this is visible from the dropdown when not selected and be hidden from the dropdown when selected? PS - this from angular

mat-option.png

This thread is trying to answer question "How do I filter through <mat-autocomplete> -> <mat-option> and check for 'Payments' text, and verify if it is visible from the dropdown when not selected and hidden when selected in Angular?"

3 replies

Bumping for visibility <:ZUCC:518794846820106286>

Explain "filter-through", "check-for... here". Kindly rephrase since it is difficult to understand what exactly you're asking here. Keywords: how, what, why, etc.

.aleksandaraleksandrov
.aleksandaraleksandrov

Why don't try with the code generator and work your way from there.

await page.locator("#mat-autocomplete']").click(); await page.getByRole('option', { name: '..............' }).click();

Try this, too.

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 luc@ray.run.