diff --git a/instructions/playwright-python.instructions.md b/instructions/playwright-python.instructions.md index 92bbc77..f2cca5c 100644 --- a/instructions/playwright-python.instructions.md +++ b/instructions/playwright-python.instructions.md @@ -27,6 +27,8 @@ applyTo: '**' - **Element Counts**: Use expect(locator).to_have_count() to assert the number of elements found by a locator. - **Text Content**: Use expect(locator).to_have_text() for exact text matches and expect(locator).to_contain_text() for partial matches. - **Navigation**: Use expect(page).to_have_url() to verify the page URL. +- **Assertion Style**: Prefer `expect` over `assert` for more reliable UI tests. + ## Example