| 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 |