playwright.expect.expect_not_to_have_attribute
*, timeout=None) playwright.expect.expect_not_to_have_attribute(loc, name,
Expect that the attribute does not exist.
This method wraps Playwright's Locator expectation not_to_have_attribute()
and sets the value to a regular expression that matches anything.
If you'd like to check for a specific value, use Playwright's expect(loc).to_have_attribute()
method, instead.
Parameters
Name | Type | Description | Default |
---|---|---|---|
loc | Locator |
The Playwright locator to check. | required |
name | str | The attribute name that should not be found within the resolved locator. | required |
timeout | Timeout |
The maximum time to wait for the attribute to appear | None |