我有如下给出的 HTML:
<root>
<Customer cid= "C1" name="Janine" city="Issaquah">
<input name="Client.ClaimsAdjudicationPendReason" />
<a onclick="javascript:pendReasonLookup('MFM_Pend Reason', 'PendReason','txtClaimsAdjudicationPendReason','','')>
<img title="Lookup" class="imgSearchIcon" alt="Lookup" src="/F005web/images/search.gif"/>
<input name="Client.ClaimsAdjudication" />
<a onclick="javascript:pendReasonLookup('MFM_Pend Reason', 'PendReason','txtClaimsAdjudication','','')>
<img title="Lookup" class="imgSearchIcon" alt="Lookup" src="/F005web/images/search.gif"/>
</Customer>
</root>
使用下面的 xpath,我可以选择“输入”节点,其中
name="Client.ClaimsAdjudicationPendReason"
xpath:=//input[@name='Client.ClaimsAdjudicationPendReason']
但我需要选择img
节点(就在a
标签下方)
name="Client.ClaimsAdjudicationPendReason"