Hi I want to locate the href element connected to a student named "John Doe" based on the following-sibling input value of 'ST'. This the code im using to select the element:
driver.find_element_by_xpath('//a[following-sibling::input[@value="ST"]]/@href').click()
It's locating the correct element but im getting this error:
selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: The result of the xpath expression "//a[following-sibling::input[@value="ST"]]/@href" is: [object Attr]. It should be an element.
How can I fix this?