如何使用 ruby 和 watir 单击隐藏的复选框和/或更改隐藏元素的值(从“2”到“1”)?
html
[div class="spec"]
[span class="listheader"]Rechtsgebieden[/span]
[div]
[span class="legalarea" style="cursor:default" onmouseout="hlt(this,false);" onmouseover="hlt(this,true);" ondblclick="call(this, '.legalarea');" onclick="call(this, '.legalarea');"]
[table id="ctl00_cphMC_SS_eJuris_fltrJurLegalArea_cbt" border="0"] [/table]
[/div]
[span class="legalarea-root " style="cursor:default" onmouseout="hlt(this,false);" onmouseover="hlt(this,true);"]
[div id="ctl00_cphMC_SS_eJuris_fltrJurLegalArea_qwtA105qwausqwt_pu" class="CheckboxValuePopup" style="display:none;position:absolute;" name="ctl00-cphMC-SS-eJuris-fltrJurLegalArea-qwtA105qwausqwt-pu"] [/div]
[span class="legalarea-root " style="cursor:default" onmouseout="hlt(this,false);" onmouseover="hlt(this,true);"]
[input id="ctl00_cphMC_SS_eJuris_fltrJurLegalArea_qwtA109qwausqwt_cb_cv" type="hidden" value="2" name="ctl00$cphMC$SS$eJuris$fltrJurLegalArea$qwtA109qwausqwt$cb_cv"]
[img ondblclick="CheckBox(this, '.ctl00-cphMC-SS-eJuris-fltrJurLegalArea-qwtA109qwausqwt-pu', true);" onclick="CheckBox(this, '.ctl00-cphMC-SS-eJuris-fltrJurLegalArea-qwtA109qwausqwt-pu', true);" src="http://portal.rechtsorde.nl/img/2.png"]
[a class="search-filter-link" onclick="$('.ctl00-cphMC-SS-eJuris-fltrJurLegalArea-qwtA109qwausqwt-pu').dialog('open'); callerID=this;"]Handels- en ondernemingsrecht[/a]
用于访问元素/查找值的代码:
browser.hidden(:name, /A111/)first.value