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

Method snapshot_frame

tests/async/conftest.py:168–175  ·  view source on GitHub ↗
(
        self, action_name: str, ordinal: int = 0, has_subframe: bool = False
    )

Source from the content-addressed store, hash-verified

166 )
167
168 async def snapshot_frame(
169 self, action_name: str, ordinal: int = 0, has_subframe: bool = False
170 ) -> FrameLocator:
171 await self.select_action(action_name, ordinal)
172 expected_frames = 4 if has_subframe else 3
173 while len(self.page.frames) < expected_frames:
174 await self.page.wait_for_event("frameattached")
175 return self.page.frame_locator("iframe.snapshot-visible[name=snapshot]")
176
177 async def show_source_tab(self) -> None:
178 await self.page.click("text='Source'")

Calls 3

select_actionMethod · 0.95
wait_for_eventMethod · 0.45
frame_locatorMethod · 0.45

Tested by

no test coverage detected