Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Child pages (Children Display)

Related pages

 

 

 

Advice

  • Use Chrome's dev tools to test your XPath selectors quickly! Image Added
  • Here's a particularly tricky selector:
    • Code Block
      languagepy
      haha_element = add_reaction_button.find_element_by_xpath('//span[@aria-label="Haha" and '
                                                               'ancestor::div[@aria-label="Reactions"] and '
                                                               'not(ancestor::div[contains(@class,"fb_content")])]')