使用selenium Firefox点击复选框-2的vba代码

时间:2017-10-16 04:06:26

标签: vba selenium firefox

我想点击复选框2.我正在使用firefox selenium。下面是我试过的vba代码

driver.FindElementByXPath("//div[@id='pt_opt']/a[2]").Click 

但我收到错误:

Run-time error'13':Unknown erro element is not clickable at    
point(258,10).other element would receive the click:<header id="Header-wrap" 
class="RosHeadosrch"></header>

以下是html代码。

</div
<div id="pt_opt" class="optionBox chkbx f12"> 
<a val="6" href="javascript:void(0)" class="ptbx"><b></b><em>Ready to Move</em></a>
<a val="2" href="javascript:void(0)" class="ptbx"><b></b><em>Within 3 months</em></a>
<a val="3" href="javascript:void(0)" class="ptbx"><b></b><em>Within 6 months</em></a>
<a val="4" href="javascript:void(0)" class="ptbx"><b></b><em>Within 1 Year</em></a>
<a val="7" href="javascript:void(0)" class="ptbx"><b></b><em>Within 1-2 Years</em></a>
<a val="5" href="javascript:void(0)" class="ptbx"><b></b><em>Within 2-3 Years</em></a>
<a val="1" href="javascript:void(0)" class="ptbx"><b></b><em>New Launch</em></a>
<input type="hidden" id="posession_time" name="posession time" class="hidEle" autocomplete="off" val="" value="">    
</div>
<div class="clr pdt10"></div>
</div>

0 个答案:

没有答案