【发布时间】:2017-06-06 04:33:11
【问题描述】:
我有一个需要点击的链接,它位于另一个元素的下方。像这样的:
______________________
| A ____________ | <-- on top
|____|B_________|____|
|__________| < - on bottom (need to click this one)
当我尝试点击底部链接时,我得到了
(B) is not clickable at point (254, 5). Other element would receive the click: (A).
Here 是一张图片(我需要点击 PO Box 链接)。我不知道在这里做什么。谢谢!
这是有问题的 HTML。 Selenium 正在将点击动作发送到 span labelFieldWrapper:
<div class='clr type_address formFieldContainer'>
<span class="labelFieldWrapper">
<label class="placeholder" for="address1">
<span class="labelText">Address 1</span>
</label>
<input id="address1" name="address1" type="text" value="" autofillparam="ON" size="20" maxlength="60"/><span class="asterisk">*</span>
</span>
<p class="helpLink">
<a href="javascript: void(0)"
onclick="window.open('/checkout/canadian_province_support.jsp',
'pobox',
'width=450, \
height=200, \
directories=no, \
location=no, \
menubar=no, \
resizable=no, \
scrollbars=1, \
status=no, \
toolbar=no');
return false;">PO Box?</a> <-- Trying to click on this link
</p>
</div><!-- /formFieldContainer -->
【问题讨论】:
-
我认为唯一的出路是
Actionsclass。谢谢 -
我该怎么做?我之前只使用
Actions进行悬停操作。 -
点击想要的元素会有点棘手。如果它是公共网址,您可以分享网址吗?请提及手动步骤以供参考。谢谢