Jump to content
UBot Underground

Xpath Help Total Noob


Recommended Posts

I'm trying to write an xpath to click on this button highlighted , it seems to be the most unique thing

 

I just need a few examples then I should be able to work it out myself from then on :)

 

<button id="button" class="style-scope yt-icon-button" aria-label="More actions">
      <yt-icon class="style-scope ytd-menu-renderer"><svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" class="style-scope yt-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;"><g class="style-scope yt-icon">
        <circle cx="5" cy="12" r="2" class="style-scope yt-icon"></circle><circle cx="12" cy="12" r="2" class="style-scope yt-icon"></circle><circle cx="19" cy="12" r="2" class="style-scope yt-icon"></circle>
      </g></svg>
    
    
  </yt-icon>
    </button>

Link to post
Share on other sites

Actually it's not free. You get it with your ExBrowser license :-)

 

Regards

Dan

 

And it works fantastic - if you know what your doing lol . I spent a good part of a hour working through it - checking stack overflow

 

so incase anyone wants to do a similar thing heres how I figured it out

 

Example form SO

"//button[contains(@class,\"CalendarDay__button\") and contains(@aria-label,\"Choose monday, february 5 2018 as your check-in date. It's available.\")]"

I then narrowed it down to the nearest : as in =

 

//*[@id=nearest]//button[contains(@attribute1, \"content1\") and contains(@attribute2, \"content2\")]

 

So by starting with a semi-difficult problem I now have the skills to romp through the more simple ones.

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...