MCPcopy Index your code
hub / github.com/microsoft/playwright-python / to_have_css

Method to_have_css

playwright/_impl/_assertions.py:470–490  ·  view source on GitHub ↗
(
        self,
        name: str,
        value: Union[str, Pattern[str]],
        timeout: float = None,
        pseudo: Literal["after", "before"] = None,
    )

Source from the content-addressed store, hash-verified

468 await self._not.to_have_count(count, timeout)
469
470 async def to_have_css(
471 self,
472 name: str,
473 value: Union[str, Pattern[str]],
474 timeout: float = None,
475 pseudo: Literal["after", "before"] = None,
476 ) -> None:
477 __tracebackhide__ = True
478 expected_text = to_expected_text_values([value])
479 await self._expect_impl(
480 "to.have.css",
481 FrameExpectOptions(
482 expressionArg=name,
483 expectedText=expected_text,
484 timeout=timeout,
485 pseudo=pseudo,
486 ),
487 value,
488 "Locator expected to have CSS",
489 'Expect "to_have_css"',
490 )
491
492 async def not_to_have_css(
493 self,

Calls 3

FrameExpectOptionsClass · 0.90
to_expected_text_valuesFunction · 0.85
_expect_implMethod · 0.80