我可以根据特定的值 Select 一行,然后获取所需的列.
//td[text()='Bachelor']/following-sibling::td[@class='action']
HTML
I want to select based on negation: Click the Action Button for all students that are NOT of type Master
//td[not(text()='Master')]/following-sibling::td[@class='action']
But wrongly selects both (only Student's row should be selected):
使用chrome XPath解析器(f12)进行测试,以便稍后在Selenium中使用XPath查询.
在我所做的研究中,找不到任何类似的例子或深入的解释.