MCPcopy Create free account
hub / github.com/microsoft/playwright-python / to_have_id

Method to_have_id

playwright/_impl/_assertions.py:501–514  ·  view source on GitHub ↗
(
        self,
        id: Union[str, Pattern[str]],
        timeout: float = None,
    )

Source from the content-addressed store, hash-verified

499 await self._not.to_have_css(name, value, timeout)
500
501 async def to_have_id(
502 self,
503 id: Union[str, Pattern[str]],
504 timeout: float = None,
505 ) -> None:
506 __tracebackhide__ = True
507 expected_text = to_expected_text_values([id])
508 await self._expect_impl(
509 "to.have.id",
510 FrameExpectOptions(expectedText=expected_text, timeout=timeout),
511 id,
512 "Locator expected to have ID",
513 'Expect "to_have_id"',
514 )
515
516 async def not_to_have_id(
517 self,

Calls 3

FrameExpectOptionsClass · 0.90
to_expected_text_valuesFunction · 0.85
_expect_implMethod · 0.80