fix none content frame (#659)

This commit is contained in:
LawyZheng 2024-07-30 11:35:14 +08:00 committed by GitHub
parent 3d2e27ebd1
commit 85d5e0de7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,6 +60,9 @@ async def resolve_locator(
child_frame = iframe_path.pop()
frame_handler = await current_frame.query_selector(f"[{SKYVERN_ID_ATTR}='{child_frame}']")
if frame_handler is None:
raise NoneFrameError(frame_id=child_frame)
content_frame = await frame_handler.content_frame()
if content_frame is None:
raise NoneFrameError(frame_id=child_frame)