使用水豚红宝石处理iframe [英] handling iframe with capybara ruby
本文介绍了使用水豚红宝石处理iframe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
下面是html代码。.
Below is the html code ..
<iframe id="I0_1366100881331" frameborder="0" width="100%">
<div class="ZRa">
<span id="button" class="hAa Qo Bg" tabindex="0" role="button" title="" aria- label="Click here to publicly +1 this." aria-pressed="false">
</div>
</iframe>
在上述情况下,我想切换到IFRAME(iframe id = I0_1366100881331)来在该IFRAME中存在的SPAN上执行一些操作。我已经尝试了大多数情况,但没有结果:(...任何人都可以帮忙。
In the above scenario, I want to switch into the IFRAME (iframe id="I0_1366100881331") to perform some actions on the SPAN present in that IFRAME. I have tried with most of the cases but no result :(... any one please help.
我只想使用水豚红宝石来解决黄瓜问题。.
I want the solution for cucumber using capybara ruby only..
注意:我尝试使用以下代码,但没有结果。
Note: I tried with following code but no result.
page.driver.browser.switch_to.frame I0_1366100881331
page.driver.browser.switch_to.frame "I0_1366100881331"
推荐答案
within_frame(find('<css rule>')) do
<code for dealing with iframe entries>
end
这篇关于使用水豚红宝石处理iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文