【发布时间】:2015-06-15 21:35:22
【问题描述】:
我确实有以下 html 文本:
<tr class="off" onmouseout="this.className='off'"onmouseover="this.className='over'">
<td><input type="checkbox" name="caller_enrollment_form:enrollmentParticipantSelectionTable:0:personSelection" id="caller_enrollment_form:enrollmentParticipantSelectionTable:0:personSelection" value="true" />
</td>
<td><span id="caller_enrollment_form:enrollmentParticipantSelectionTable:0:extClientId">111</span>
</td>
<td><span id="caller_enrollment_form:enrollmentParticipantSelectionTable:0:clientName">SAMUEL</span>
</td>
我正在尝试单击同一行中包含数据 111 的复选框。
我正在尝试这样的事情:
page.FindChildByXPath("//span[contains(text(),'111')]/parent::td/preceding-sibling::td/input[@name='caller_enrollment_form:enrollmentParticipantSelectionTable:0:personSelection' ]",假)
但我得到 object not found 错误。
【问题讨论】:
-
欢迎来到 StackOverflow。我已将您的 HTML 合并到问题中,并添加了一些更合适的标签。您可以像我一样单击edit 按钮添加内容以改进问题中的细节。希望你能找到答案。
标签: html xpath testcomplete