MCPcopy Create free account
hub / github.com/Vinyzu/Botright / test_frame_name

Function test_frame_name

tests/playwright_tests/test_frames.py:211–225  ·  view source on GitHub ↗
(page, utils, server)

Source from the content-addressed store, hash-verified

209
210@pytest.mark.asyncio
211async def test_frame_name(page, utils, server):
212 await utils.attach_frame(page, "theFrameId", server.EMPTY_PAGE)
213 await page.evaluate(
214 """url => {
215 frame = document.createElement('iframe');
216 frame.name = 'theFrameName';
217 frame.src = url;
218 document.body.appendChild(frame);
219 return new Promise(x => frame.onload = x);
220 }""",
221 server.EMPTY_PAGE,
222 )
223 assert page.frames[0].name == ""
224 assert page.frames[1].name == "theFrameId"
225 assert page.frames[2].name == "theFrameName"
226
227
228@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 1

attach_frameMethod · 0.80

Tested by

no test coverage detected