From 0bada4b31b3ac3679628fa73ce6ff854a89b8bf7 Mon Sep 17 00:00:00 2001 From: Dawn Wages Date: Thu, 31 Aug 2023 11:42:32 -0400 Subject: [PATCH] docs: python installation code block update (#26818) --- docs/src/intro-python.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/intro-python.md b/docs/src/intro-python.md index 8a07ab3a12..77bf361a12 100644 --- a/docs/src/intro-python.md +++ b/docs/src/intro-python.md @@ -47,9 +47,9 @@ playwright install ## Add Example Test -Create a `test_my_application.py` file inside the current working directory or in a sub-directory with the code below: +Create a file that follows the `test_` prefix convention, such as `test_my_application.py`, inside the current working directory or in a sub-directory with the code below: -```py +```py title="test_my_application.py" import re from playwright.sync_api import Page, expect @@ -69,8 +69,8 @@ def test_homepage_has_Playwright_in_title_and_get_started_link_linking_to_the_in # Click the get started link. get_started.click() - # Expects the URL to contain intro. - expect(page).to_have_url(re.compile(".*intro")) + # Expects page to have a heading with the name of Installation. + expect(page.get_by_role("heading", name="Installation")).to_be_visible() ``` ## Running the Example Test