繁体   English   中英

使用Ruby和Watir设置单选按钮

[英]Setting Radio button using Ruby and Watir

是的,我在一段代码上遇到了问题。 我知道如何设置单选按钮,我可以在大多数网站上做到这一点。 但是,当尝试设置下面这段代码给出的值时,我无法使其工作。 我已经尝试使用标签ect进行“等待直到”,“父设置”,并进行了各种搜索。 谁能指出我正确的方向。

<div class="CheckBoxContainer">

<ol>
    <li>
        <span class="radio" style="background-position: 0px 0px;"></span>
        <input class="styled" type="radio" value="1" name="clocksource"></input>
        <label class="dialogRT">

            Internal

        </label>
    </li>
    <li>
        <span class="radio" style="background-position: 0px 0px;"></span>
        <input class="styled" type="radio" value="3" name="clocksource"></input>
        <label class="dialogRT">

            External AES50

        </label>
    </li>
    <li>
        <span class="radio" style="background-position: 0px -50px;"></span>
        <input class="styled" type="radio" checked="checked" value="2"       name="clocksource"></input>
        <label class="dialogRT">

            External Snake

        </label>
    </li>
</ol>

我收到此错误:

[remote server] file:///var/folders/81/j_87g_h12_x7bkl2w58zwqr00000gn/T/webdriver-profile20131024-1211-10eh16l/extensions/fxdriver@googlecode.com/components/command_processor.js:8210:in `fxdriver.preconditions.visible': Element is not currently visible and so may not be interacted with 

谢谢

Maximillion

我怀疑您有时间问题。 尝试这个:

Watir::Wait.until { @browser.element.visible?, thing  }

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM