René's URL Explorer Experiment


Title: Locators | Playwright Python

Open Graph Title: Locators | Playwright Python

Description: Introduction

Open Graph Description: Introduction

Opengraph URL: https://playwright.dev/python/docs/locators

Generator: Docusaurus v3.8.1

direct link

Domain: playwright.dev


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","item":"https://playwright.dev/python/docs/locators","name":"Locators","position":1}]}

twitter:cardsummary_large_image
og:imagehttps://repository-images.githubusercontent.com/221981891/8c5c6942-c91f-4df1-825f-4cf474056bd7
twitter:imagehttps://repository-images.githubusercontent.com/221981891/8c5c6942-c91f-4df1-825f-4cf474056bd7
og:localeen
docusaurus_localeen
docsearch:languageen
docusaurus_versionstable
docusaurus_tagdocs-default-stable
docsearch:versionstable
docsearch:docusaurus_tagdocs-default-stable

Links:

Skip to main contenthttps://playwright.dev/python/docs/locators#__docusaurus_skipToContent_fallback
Playwright for Pythonhttps://playwright.dev/python/
Docshttps://playwright.dev/python/docs/intro
APIhttps://playwright.dev/python/docs/api/class-playwright
Pythonhttps://playwright.dev/python/docs/locators
Pythonhttps://playwright.dev/python/docs/locators
Node.jshttps://playwright.dev/docs/locators
Javahttps://playwright.dev/java/docs/locators
.NEThttps://playwright.dev/dotnet/docs/locators
Communityhttps://playwright.dev/python/community/welcome
https://github.com/microsoft/playwright-python
https://aka.ms/playwright/discord
Getting Startedhttps://playwright.dev/python/docs/intro
Installationhttps://playwright.dev/python/docs/intro
Writing testshttps://playwright.dev/python/docs/writing-tests
Generating testshttps://playwright.dev/python/docs/codegen-intro
Running and debugging testshttps://playwright.dev/python/docs/running-tests
Trace viewerhttps://playwright.dev/python/docs/trace-viewer-intro
Setting up CIhttps://playwright.dev/python/docs/ci-intro
Pytest Plugin Referencehttps://playwright.dev/python/docs/test-runners
Getting started - Libraryhttps://playwright.dev/python/docs/library
Release noteshttps://playwright.dev/python/docs/release-notes
Guideshttps://playwright.dev/python/docs/input
Actionshttps://playwright.dev/python/docs/input
Auto-waitinghttps://playwright.dev/python/docs/actionability
API testinghttps://playwright.dev/python/docs/api-testing
Assertionshttps://playwright.dev/python/docs/test-assertions
Authenticationhttps://playwright.dev/python/docs/auth
Browsershttps://playwright.dev/python/docs/browsers
Chrome extensionshttps://playwright.dev/python/docs/chrome-extensions
Clockhttps://playwright.dev/python/docs/clock
Debugging Testshttps://playwright.dev/python/docs/debug
Dialogshttps://playwright.dev/python/docs/dialogs
Downloadshttps://playwright.dev/python/docs/downloads
Emulationhttps://playwright.dev/python/docs/emulation
Evaluating JavaScripthttps://playwright.dev/python/docs/evaluating
Eventshttps://playwright.dev/python/docs/events
Extensibilityhttps://playwright.dev/python/docs/extensibility
Frameshttps://playwright.dev/python/docs/frames
Handleshttps://playwright.dev/python/docs/handles
Isolationhttps://playwright.dev/python/docs/browser-contexts
Locatorshttps://playwright.dev/python/docs/locators
Mock APIshttps://playwright.dev/python/docs/mock
Navigationshttps://playwright.dev/python/docs/navigations
Networkhttps://playwright.dev/python/docs/network
Other locatorshttps://playwright.dev/python/docs/other-locators
Pageshttps://playwright.dev/python/docs/pages
Page object modelshttps://playwright.dev/python/docs/pom
Screenshotshttps://playwright.dev/python/docs/screenshots
Snapshot testinghttps://playwright.dev/python/docs/aria-snapshots
Test generatorhttps://playwright.dev/python/docs/codegen
Touch events (legacy)https://playwright.dev/python/docs/touch-events
Trace viewerhttps://playwright.dev/python/docs/trace-viewer
Videoshttps://playwright.dev/python/docs/videos
WebView2https://playwright.dev/python/docs/webview2
Integrationshttps://playwright.dev/python/docs/docker
Supported languageshttps://playwright.dev/python/docs/languages
https://playwright.dev/python/
https://playwright.dev/python/docs/locators#introduction
Locatorhttps://playwright.dev/python/docs/api/class-locator
https://playwright.dev/python/docs/locators#quick-guide
page.get_by_role()https://playwright.dev/python/docs/locators#locate-by-role
page.get_by_text()https://playwright.dev/python/docs/locators#locate-by-text
page.get_by_label()https://playwright.dev/python/docs/locators#locate-by-label
page.get_by_placeholder()https://playwright.dev/python/docs/locators#locate-by-placeholder
page.get_by_alt_text()https://playwright.dev/python/docs/locators#locate-by-alt-text
page.get_by_title()https://playwright.dev/python/docs/locators#locate-by-title
page.get_by_test_id()https://playwright.dev/python/docs/locators#locate-by-test-id
https://playwright.dev/python/docs/locators#locating-elements
page.get_by_role()https://playwright.dev/python/docs/api/class-page#page-get-by-role
code generatorhttps://playwright.dev/python/docs/codegen
page.get_by_label()https://playwright.dev/python/docs/api/class-page#page-get-by-label
Locatorhttps://playwright.dev/python/docs/api/class-locator
FrameLocatorhttps://playwright.dev/python/docs/api/class-framelocator
https://playwright.dev/python/docs/locators#locate-by-role
page.get_by_role()https://playwright.dev/python/docs/api/class-page#page-get-by-role
buttons, checkboxes, headings, links, lists, tables, and many morehttps://www.w3.org/TR/html-aria/#docconformance
ARIA rolehttps://www.w3.org/TR/wai-aria-1.2/#roles
ARIA attributeshttps://www.w3.org/TR/wai-aria-1.2/#aria-attributes
accessible namehttps://w3c.github.io/accname/#dfn-accessible-name
implicitly defined rolehttps://w3c.github.io/html-aam/#html-element-role-mappings
https://playwright.dev/python/docs/locators#locate-by-label
page.get_by_label()https://playwright.dev/python/docs/api/class-page#page-get-by-label
https://playwright.dev/python/docs/locators#locate-by-placeholder
page.get_by_placeholder()https://playwright.dev/python/docs/api/class-page#page-get-by-placeholder
https://playwright.dev/python/docs/locators#locate-by-text
page.get_by_text()https://playwright.dev/python/docs/api/class-page#page-get-by-text
role locatorshttps://playwright.dev/python/docs/locators#locate-by-role
filter by texthttps://playwright.dev/python/docs/locators#filter-by-text
https://playwright.dev/python/docs/locators#locate-by-alt-text
page.get_by_alt_text()https://playwright.dev/python/docs/api/class-page#page-get-by-alt-text
https://playwright.dev/python/docs/locators#locate-by-title
page.get_by_title()https://playwright.dev/python/docs/api/class-page#page-get-by-title
https://playwright.dev/python/docs/locators#locate-by-test-id
page.get_by_test_id()https://playwright.dev/python/docs/api/class-page#page-get-by-test-id
rolehttps://playwright.dev/python/docs/locators#locate-by-role
text locatorshttps://playwright.dev/python/docs/locators#locate-by-text
rolehttps://playwright.dev/python/docs/locators#locate-by-role
texthttps://playwright.dev/python/docs/locators#locate-by-text
https://playwright.dev/python/docs/locators#set-a-custom-test-id-attribute
page.get_by_test_id()https://playwright.dev/python/docs/api/class-page#page-get-by-test-id
selectors.set_test_id_attribute()https://playwright.dev/python/docs/api/class-selectors#selectors-set-test-id-attribute
https://playwright.dev/python/docs/locators#locate-by-css-or-xpath
page.locator()https://playwright.dev/python/docs/api/class-page#page-locator
role locatorshttps://playwright.dev/python/docs/locators#locate-by-role
define an explicit testing contracthttps://playwright.dev/python/docs/locators#locate-by-test-id
https://playwright.dev/python/docs/locators#locate-in-shadow-dom
Closed-mode shadow rootshttps://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow#parameters
https://playwright.dev/python/docs/locators#filtering-locators
https://playwright.dev/python/docs/locators#filter-by-text
locator.filter()https://playwright.dev/python/docs/api/class-locator#locator-filter
https://playwright.dev/python/docs/locators#filter-by-not-having-text
https://playwright.dev/python/docs/locators#filter-by-childdescendant
locator.get_by_role()https://playwright.dev/python/docs/api/class-locator#locator-get-by-role
locator.get_by_test_id()https://playwright.dev/python/docs/api/class-locator#locator-get-by-test-id
locator.get_by_text()https://playwright.dev/python/docs/api/class-locator#locator-get-by-text
https://playwright.dev/python/docs/locators#filter-by-not-having-childdescendant
https://playwright.dev/python/docs/locators#locator-operators
https://playwright.dev/python/docs/locators#matching-inside-a-locator
page.get_by_text()https://playwright.dev/python/docs/api/class-page#page-get-by-text
locator.get_by_role()https://playwright.dev/python/docs/api/class-locator#locator-get-by-role
https://playwright.dev/python/docs/locators#matching-two-locators-simultaneously
locator.and_()https://playwright.dev/python/docs/api/class-locator#locator-and
page.get_by_role()https://playwright.dev/python/docs/api/class-page#page-get-by-role
page.get_by_title()https://playwright.dev/python/docs/api/class-page#page-get-by-title
https://playwright.dev/python/docs/locators#matching-one-of-the-two-alternative-locators
locator.or_()https://playwright.dev/python/docs/api/class-locator#locator-or
"strict mode violation" errorhttps://playwright.dev/python/docs/locators#strictness
locator.firsthttps://playwright.dev/python/docs/api/class-locator#locator-first
https://playwright.dev/python/docs/locators#matching-only-visible-elements
more reliable wayhttps://playwright.dev/python/docs/locators#quick-guide
visiblehttps://playwright.dev/python/docs/actionability#visible
strictnesshttps://playwright.dev/python/docs/locators#strictness
https://playwright.dev/python/docs/locators#lists
https://playwright.dev/python/docs/locators#count-items-in-a-list
https://playwright.dev/python/docs/locators#assert-all-text-in-a-list
expect(locator).to_have_text()https://playwright.dev/python/docs/api/class-locatorassertions#locator-assertions-to-have-text
https://playwright.dev/python/docs/locators#get-a-specific-item
https://playwright.dev/python/docs/locators#get-by-text
page.get_by_text()https://playwright.dev/python/docs/api/class-page#page-get-by-text
https://playwright.dev/python/docs/locators#filter-by-text-1
locator.filter()https://playwright.dev/python/docs/api/class-locator#locator-filter
https://playwright.dev/python/docs/locators#get-by-test-id
page.get_by_test_id()https://playwright.dev/python/docs/api/class-page#page-get-by-test-id
https://playwright.dev/python/docs/locators#get-by-nth-item
locator.firsthttps://playwright.dev/python/docs/api/class-locator#locator-first
locator.lasthttps://playwright.dev/python/docs/api/class-locator#locator-last
locator.nth()https://playwright.dev/python/docs/api/class-locator#locator-nth
strictness criteriahttps://playwright.dev/python/docs/locators#strictness
https://playwright.dev/python/docs/locators#chaining-filters
locator.filter()https://playwright.dev/python/docs/api/class-locator#locator-filter
https://playwright.dev/python/docs/locators#rare-use-cases
https://playwright.dev/python/docs/locators#do-something-with-each-element-in-the-list
https://playwright.dev/python/docs/locators#evaluate-in-the-page
locator.evaluate_all()https://playwright.dev/python/docs/api/class-locator#locator-evaluate-all
https://playwright.dev/python/docs/locators#strictness
https://playwright.dev/python/docs/locators#throws-an-error-if-more-than-one
https://playwright.dev/python/docs/locators#works-fine-with-multiple-elements
locator.firsthttps://playwright.dev/python/docs/api/class-locator#locator-first
locator.lasthttps://playwright.dev/python/docs/api/class-locator#locator-last
locator.nth()https://playwright.dev/python/docs/api/class-locator#locator-nth
https://playwright.dev/python/docs/locators#more-locators
other locatorshttps://playwright.dev/python/docs/other-locators
PreviousIsolationhttps://playwright.dev/python/docs/browser-contexts
NextMock APIshttps://playwright.dev/python/docs/mock
Introductionhttps://playwright.dev/python/docs/locators#introduction
Quick Guidehttps://playwright.dev/python/docs/locators#quick-guide
Locating elementshttps://playwright.dev/python/docs/locators#locating-elements
Locate by rolehttps://playwright.dev/python/docs/locators#locate-by-role
Locate by labelhttps://playwright.dev/python/docs/locators#locate-by-label
Locate by placeholderhttps://playwright.dev/python/docs/locators#locate-by-placeholder
Locate by texthttps://playwright.dev/python/docs/locators#locate-by-text
Locate by alt texthttps://playwright.dev/python/docs/locators#locate-by-alt-text
Locate by titlehttps://playwright.dev/python/docs/locators#locate-by-title
Locate by test idhttps://playwright.dev/python/docs/locators#locate-by-test-id
Locate by CSS or XPathhttps://playwright.dev/python/docs/locators#locate-by-css-or-xpath
Locate in Shadow DOMhttps://playwright.dev/python/docs/locators#locate-in-shadow-dom
Filtering Locatorshttps://playwright.dev/python/docs/locators#filtering-locators
Filter by texthttps://playwright.dev/python/docs/locators#filter-by-text
Filter by not having texthttps://playwright.dev/python/docs/locators#filter-by-not-having-text
Filter by child/descendanthttps://playwright.dev/python/docs/locators#filter-by-childdescendant
Filter by not having child/descendanthttps://playwright.dev/python/docs/locators#filter-by-not-having-childdescendant
Locator operatorshttps://playwright.dev/python/docs/locators#locator-operators
Matching inside a locatorhttps://playwright.dev/python/docs/locators#matching-inside-a-locator
Matching two locators simultaneouslyhttps://playwright.dev/python/docs/locators#matching-two-locators-simultaneously
Matching one of the two alternative locatorshttps://playwright.dev/python/docs/locators#matching-one-of-the-two-alternative-locators
Matching only visible elementshttps://playwright.dev/python/docs/locators#matching-only-visible-elements
Listshttps://playwright.dev/python/docs/locators#lists
Count items in a listhttps://playwright.dev/python/docs/locators#count-items-in-a-list
Assert all text in a listhttps://playwright.dev/python/docs/locators#assert-all-text-in-a-list
Get a specific itemhttps://playwright.dev/python/docs/locators#get-a-specific-item
Chaining filtershttps://playwright.dev/python/docs/locators#chaining-filters
Rare use caseshttps://playwright.dev/python/docs/locators#rare-use-cases
Strictnesshttps://playwright.dev/python/docs/locators#strictness
More Locatorshttps://playwright.dev/python/docs/locators#more-locators
Getting startedhttps://playwright.dev/python/docs/intro
Playwright Traininghttps://learn.microsoft.com/en-us/training/modules/build-with-playwright/
Learn Videoshttps://playwright.dev/python/community/learn-videos
Feature Videoshttps://playwright.dev/python/community/feature-videos
Stack Overflowhttps://stackoverflow.com/questions/tagged/playwright
Discordhttps://aka.ms/playwright/discord
Twitterhttps://twitter.com/playwrightweb
LinkedInhttps://www.linkedin.com/company/playwrightweb
GitHubhttps://github.com/microsoft/playwright-python
YouTubehttps://www.youtube.com/channel/UC46Zj8pDH5tDosqm1gd7WTg
Bloghttps://dev.to/playwright
Ambassadorshttps://playwright.dev/python/community/ambassadors

Viewport: width=device-width, initial-scale=1.0


URLs of crawlers that visited me.