我正在使用safariwatir,我似乎不能让我的代码从列表中选择一个选项。我用来选择的语法是:
browser.select_list(:id," select").select_value("USA")下面是表格本身的HTML代码:
<table>
<input type="textbox" name="selectedIndex" style="display:none" id="selectedIndex" />
<input type="hidden" id="fromNo" />
<input type="hidden" id="toNo" />
<tr><td height="5px" colspan="2"></td></tr>
<tr>
<td class="col-header">
Select Base No.
</td>
<td class="col-field" align="left">
<select id="select" name="select" onChange="loadFrames();disableTemporarily('select');">
<option value="" selected>Select a base</option>
<option value="CSindicator=Y&MMindicator=Y&FXindicator=Y&customerNum=MTAzNjQ5&branch=MTAy&GFCID=&accountNum=&asOfDate=&countrycode=102&activebase=MTAzNjQ5&MERMAID=c2dsaW13ZWlzYW5vbmxpbg==&PLANERILLA=c2dsaW13ZWlzYW5vbmxpbg==">USA</option>
</select>
</td>
</tr>
</table>我甚至尝试将long值和所有值放在一起。当我运行它时,终端确实输出了一个nil,这在通常情况下意味着它正在工作,但列表仍然处于未选中状态。任何想法或帮助都将不胜感激。谢谢。
发布于 2012-04-19 03:14:44
很抱歉回复晚了,但Safariwatir在这一点上几乎是一个死亡的项目。
从Safariwatir切换到Watir-Webdriver有关如何在Safari中工作的详细信息,请参阅this link
https://stackoverflow.com/questions/8663094
复制相似问题