【发布时间】:2017-01-08 21:32:55
【问题描述】:
我有一个霜复选框定义为:
<div id="protocol_input" class="ember-view frost-checkbox small">
<input id="protocol_input" class="input ember-view" type="checkbox">
<label class="label" tabindex="0" for="protocol_input">
Enable protocol
<svg xmlns="http://www.w3.org/2000/svg" viewBox="3 2 31 31">
<rect xmlns="http://www.w3.org/2000/svg" x="10.7" y="15.3" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 35.6974 26.188)" fill="%23009EEF" width="3.5" height="10.3">
<polygon xmlns="http://www.w3.org/2000/svg" fill="%23009EEF" points="14.9,25.4 12.4,22.9 26.2,9.4 28.7,12.1">
</svg>
</label>
</div>
我可以使用 selenium 对标签/输入执行单击操作,它选中/取消选中复选框,
但是,我必须得到它是否选中复选框的状态。
selected 复选框的属性在任何情况下都显示为 false。
【问题讨论】:
标签: html selenium checkbox selenium-webdriver