【发布时间】:2022-12-28 16:09:28
【问题描述】:
正如浏览器库中所解释的那样,“有一个特殊的选择器 >>> 可用于组合 iframe 或框架集的选择器以及框架内元素的选择器”,例如:
Click Web Element Is Visible iframe#iframe-example >>> //a[@onclick='buttonOK();']
如果我想选择“iframe-example”内的示例按钮,该示例工作正常。但是我怎样才能选择一个位于多个 iframe/frameset 中的元素呢?例如:
frameset >>> frame >>> iframe#iframe-example1 >>> iframe#iframe-example2 >>> //a[@onclick='buttonOK();']
选择这个元素的正确结构是什么?
我尝试了一些结构,但没有选择元素:
Click Web Element Is Visible frameset >>> frame >>> iframe#iframe-example1 >>> iframe#iframe-example2 >>> //a[@onclick='buttonOK();']
Click Web Element Is Visible frameset//frame[@id="example"]//iframe[@id="iframe-example1"]//iframe[@id="iframe-example2"]//a[@onclick='buttonOK();']
【问题讨论】:
标签: html xpath iframe robotframework frameset-iframe