Search code examples
seleniumselenium-webdriverxpathselenium-chromedriverpython-webbrowser

Getting the XPath of elements


When you first enter this site on the bottom of the site there is a statement that the site is using cookies. (You can use private window to get the "cookie statement" every time) I would like to get the XPath for the "Got it" button that basically accepts cookies. The next thing that I am struggling with is the XPath for the "Load More" button at the end of the table.

P.S. I need these XPaths for my other question which is partly answered. You can find it here


Solution

  • The Got it element xpath is (//div[contains(text(),'Got it')])[2]
    The second element xpath is //span[@class='competition-leaderboard__load-more-count']