需要搜索
frame_locator.frame_locator(selector)
在我的例子中它看起来像这样:
page.frame_locator("iframe").locator(".sc-iAEawV > .sc-gikAfH > .sc-iJnaPW")