0

So I need to pull the XPath of an element for some code and can't find a way to pull it using

Comment = find_element_by_link_text(str(Comments))
CommentXPath = Comment.???
  • Does this answer your question? [Selenium / lxml : Get xpath](https://stackoverflow.com/questions/12788059/selenium-lxml-get-xpath) – David Silveiro Aug 16 '20 at 00:29
  • Can you please share what your overall goal is? - in selenium xpaths are used for identifiers, but by the definition of what you are trying to do, you've already identified your object. If we know why, someone may be able to help in another way – RichEdwards Aug 16 '20 at 16:40
  • Is this solve your problem - https://stackoverflow.com/questions/24411765/how-to-get-an-xpath-from-selenium-webelement-or-from-lxml – Swaroop Humane Aug 17 '20 at 15:32

0 Answers0