[英]Playwright - how to switch to new tab and then to frame
I have below scenario -我有以下情况 -
How can I handle this in playwright?我如何在剧作家中处理这个问题? Once I switch to new tab, all elements are inside frame, so I want to switch to new frame after switching to new tab
一旦我切换到新标签,所有元素都在框架内,所以我想在切换到新标签后切换到新框架
Note - Frame doesn't have name.注意 - 框架没有名称。 I can use xpath to identify frame.
我可以使用 xpath 来识别框架。
will page.frame("xpath to iframe") work? page.frame("xpath to iframe") 会工作吗?
If anyone can provide small code snippet, would be really helpful.如果有人可以提供小代码片段,那将非常有帮助。
I Tried using page.frame("xpath locator to iframe") - but not working我尝试使用 page.frame("xpath locator to iframe") - 但不工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.