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

Method to_have_title

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

Source from the content-addressed store, hash-verified

162 )
163
164 async def to_have_title(
165 self, titleOrRegExp: Union[Pattern[str], str], timeout: float = None
166 ) -> None:
167 __tracebackhide__ = True
168 expected_values = to_expected_text_values(
169 [titleOrRegExp], normalize_white_space=True
170 )
171 await self._expect_impl(
172 "to.have.title",
173 FrameExpectOptions(expectedText=expected_values, timeout=timeout),
174 titleOrRegExp,
175 "Page title expected to be",
176 'Expect "to_have_title"',
177 )
178
179 async def not_to_have_title(
180 self, titleOrRegExp: Union[Pattern[str], str], timeout: float = None

Calls 3

FrameExpectOptionsClass · 0.90
to_expected_text_valuesFunction · 0.85
_expect_implMethod · 0.80