xpath的通配符用法
我在使用xpath选择以下两个标记时遇到问题:xpath的通配符用法,xpath,Xpath,我在使用xpath选择以下两个标记时遇到问题: <div class="table-row"> <div class="table-row "> 但这与上述任何一项都不匹配 我做错了什么?谢谢您的帮助。使用以开头以匹配通配符'*' //div[starts-with(@class, 'table-row')] 使用以开头以匹配通配符的位置 //div[starts-with(@class, 'table-row')] 还有//div[contains(@class,
<div class="table-row">
<div class="table-row ">
但这与上述任何一项都不匹配
我做错了什么?谢谢您的帮助。使用
以开头以匹配通配符'*'
//div[starts-with(@class, 'table-row')]
使用以
开头以匹配通配符的位置
//div[starts-with(@class, 'table-row')]
还有//div[contains(@class,'table row')]@stav:contains
在这种情况下不应使用。由于包含的将与类匹配,如测试表行,测试表行测试,测试1表行。。。很快。而且//div[contains(@class,'table row')]@stav:contains
在这种情况下不应使用。由于包含的将与类匹配,如测试表行,测试表行测试,测试1表行。。。很快。