以下處理iframe是HTML代碼..與水豚紅寶石
<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」)來執行關於本SPAN一些動作在那個IFRAME中。我曾嘗試與大多數的情況,但沒有任何結果:(......任何一個請幫助
我只使用水豚紅寶石想要黃瓜解..
注:我試着用下面的代碼,但沒有。結果
page.driver.browser.switch_to.frame 「I0_1366100881331」
可能重複:http://stackoverflow.com/questions/11909149/how-can-i-switch-between-two-frames-with-capybara –