I want to locate to & lt; a> Tag, you can use//a [text ()='next page], and then how to obtain & lt; a> The content of the href tag?
CodePudding user response:
CodePudding user response:
//a/text ()="next page"]/@ href isCodePudding user response:
driver. Find_element_by_link_text (" next page "). Get_attribute (" href ")
This is one of the methods