簡體   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