Skip to content

Commit ca32c73

Browse files
committed
Switch to using get_by_role for buttons
1 parent badab5b commit ca32c73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/integration/tests_playwright/test_frontend_path.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ def test_onload_redirect(
126126
expect(page.get_by_text("This is the index page!")).to_be_visible()
127127

128128
# Go to /subpage
129-
page.get_by_text("Go to Subpage!").click()
129+
page.get_by_role("button", name="Go to Subpage!").click()
130130
expect(page.get_by_text("This is the sub page!")).to_be_visible()
131131

132132
# Click "Bounce to index!" (should redirect to index via on_load)
133-
page.get_by_text("Bounce to index!").click()
133+
page.get_by_role("button", name="Bounce to index!").click()
134134
expect(page.get_by_text("This is the index page!")).to_be_visible()
135135

136136
# Optionally, reload /prefix/bouncer/ and check redirect

0 commit comments

Comments
 (0)