【发布时间】:2016-05-13 17:15:54
【问题描述】:
在robotframework 中使用xpath 定位器,无法使用ride(机器人框架)为下面的HTML 标签选择单选按钮。
<Pre>
<div class="controls">
<input checked="checked" data-val="true" data-val-required="The isPdfFormat field is required." id="isPdfFormat" name="isPdfFormat" value="true" type="radio"></input> PDF
<input checked="checked" id="isPdfFormat" name="isPdfFormat" value="false" type="radio"></input> CSV
</div>
</Pre>
【问题讨论】:
-
哪个单选按钮?第一还是第二?
xpath可以用来这样做。 -
第二个?你能不能给我同样的X-path。让我知道 xpath=//input[@id='isPdfFormat'][contains(text(),'CSV')] 是否有效。
标签: html xpath automated-tests robotframework