playwright.expect.expect_not_to_have_style
playwright.expect.expect_not_to_have_style(loc, key, *, timeout=None)
Expect a key within style
attribute to not exist.
Convenience method to check if a CSS key does not exist within the style
attribute. The key
is escaped within a regular expression that checks within word boundaries or the start/end of the style
string.
This is different than Playwright's to_have_css(key, value)
method, as that method will check for the computed style of the element. Whereas this method will check the style
attribute directly.
Parameters
loc:
Locator
-
The Playwright locator to check.
key: str
-
The CSS key to check.
timeout:
Timeout
= None-
The maximum time to wait for the style to appear.
See Also
- :func:`shiny.playwright.expect.expect_to_have_style