(page: Page)
| 131 | |
| 132 | |
| 133 | def test_get_by_title(page: Page) -> None: |
| 134 | page.set_content( |
| 135 | """<div> |
| 136 | <input title="Hello"> |
| 137 | <input title="Hello World"> |
| 138 | </div>""" |
| 139 | ) |
| 140 | |
| 141 | expect(page.get_by_title("hello")).to_have_count(2) |
| 142 | expect(page.main_frame.get_by_title("hello")).to_have_count(2) |
| 143 | expect(page.locator("div").get_by_title("hello")).to_have_count(2) |
| 144 | |
| 145 | expect(page.get_by_title("hello")).to_have_count(2) |
| 146 | expect(page.get_by_title("Hello", exact=True)).to_have_count(1) |
| 147 | expect(page.get_by_title(re.compile(r"wor", re.IGNORECASE))).to_have_count(1) |
| 148 | |
| 149 | # Coverage |
| 150 | expect(page.main_frame.get_by_title("hello")).to_have_count(2) |
| 151 | expect(page.locator("div").get_by_title("hello")).to_have_count(2) |
| 152 | |
| 153 | |
| 154 | def test_get_by_escaping(page: Page) -> None: |
nothing calls this directly
no test coverage detected