0
<div>
<input type="checkbox" data-bind="checked: isSelected">
Select this box
</input>
</div>

嗨,我正在尝试使用 xpath 中的内部文本选择复选框,但到目前为止还没有运气。例如,我知道以下内容不起作用: //input[contains(text(), 'Select this box')]

请对正确的语法有任何建议吗?注意,它需要包含内文。

谢谢

4

1 回答 1

0

您的代码有效(使用 XpathpatherizerNPP 测试):

//input[contains(text(),"Select this box")]
于 2013-03-06T10:56:37.350 回答