先定位到iframe,赋值给frame,在通过fram进行定位元素即可
可以使用 page.frame_locator() 或 locator.frame_locator()frame = page.fram_locator('[id^=x-URS-iframe]')
接下来就正常的定位元素
frame = page.get_by_placeholder('输入账号').fill('test')
标签:fram,playwright,frame,locator,iframe,操作,page From: https://www.cnblogs.com/peijiao/p/17825821.html