Sitemap
Technology Hits

We cover important, high-impact, informative, engaging stories on all aspects of technology. Subscribe to our content marketing strategy newsletter: https://drmehmetyildiz.substack.com/ Apply via: https://digitialmehmet.com/contact External: https://illumination-curated.com

Coding Chronicles #2 | Playwirght| Locate HTML Span Element With ID To Test The Visibility Of An Icon.

2 min readJan 3, 2024

--

container.locator(container.locator(`span[id=span-id”]`).first();

Press enter or click to view image in full size
Photo by Max Chen on Unsplash

A usual day in the life of a software programmer brings out many coding challenges. Most of these challenges need a few minutes of online search. I started a series of mini blogs dealing with some of these challenges. The complexity of these challenges will range from average to complex.

Last week, I wrote about an execution error with a Playwright test case (npx playwright test). Today, I am writing about locating an HTML span element for testing the visibility of an Icon.

Introduction

Playwright

Playwright is an open-source automation tool designed for end-to-end testing. Developed by Microsoft, Playwright supports many browsers, including Chromium, Firefox, and WebKit.

Official Documentation of Playwright — Fast and reliable end-to-end testing for modern web apps | Playwright

Locator Interface

Locators are the central piece of the Playwright’s auto-waiting and retry-ability. Locators represent a way to find element(s) on the page anytime.

--

--

Technology Hits
Technology Hits

Published in Technology Hits

We cover important, high-impact, informative, engaging stories on all aspects of technology. Subscribe to our content marketing strategy newsletter: https://drmehmetyildiz.substack.com/ Apply via: https://digitialmehmet.com/contact External: https://illumination-curated.com

tarun bhatt
tarun bhatt

Written by tarun bhatt

Learning to write and share. #ITNerd #MentalHealthAdvocate #MenRightsActivist #ToastMaster #PublicSpeaker

No responses yet