I can select a row based on a specific value and then fetch the desired column. Example: This XPath expression(Click the Action Button for the student of type Bachelor:)
//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):

Using chrome XPath resolver (f12) for testing for later using the XPath query in Selenium.
Couldn't find any similar example or deep explanation with the research I did.
