如何使用Java在Selenium Webdriver的框架集中切换到框架集? [英] How to switch to a frameset with in a frameset in selenium webdriver with java?
本文介绍了如何使用Java在Selenium Webdriver的框架集中切换到框架集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我找到的大多数答案都与切换到框架集中的框架有关. 以下是脚本.
Most of the answers I found were about switching to a frame within a frameset. Following is the Script.
推荐答案
无需切换到frameset
.您可以直接切换到frame
There is no need to switching to frameset
.. you can directly switch to frame
如果您的frame
结构如下所示,请作为图像描述:-
As your image description if your frame
structure is like below :-
<frameset>
<frame name = 'frame1'></frame>
<frameset>
<frame name = 'frame2'>
<frame name = 'frame3'>
</frame>
</frame>
</frameset>
</frameset>
,在这里您想切换框架名称frame3
..您只需切换到该框架,如下所示:-
and here you want to switch frame name frame3
.. you just switching to this frame as below :-
driver.switchTo().frame('frame2');
driver.switchTo().frame('frame3');
无需切换frameset
希望它将对您有帮助...:)
Hope it will help you...:)
这篇关于如何使用Java在Selenium Webdriver的框架集中切换到框架集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文