Applescript: javascript hyperlink

Hi,

I am trying to write an AppleScript to click on a hyperlink on a webpage to export a file.
Firstly there is a dropdown menu EXPORT AS, and once you click and expand the menu, I need to select and click XLSX (Microsoft [Excel)

It's worth mentioning that I have zero knowledge of javascript, XPath, etc..

When I inspect the links, I can copy the following paths but have no clue what to do with them in terms of AppleScript... So any help is greatly appreciated! :)

EXPORT AS (full XPath):
/html/body/div[1]/div[1]/div[1]/div[4]/div[2]/div[3]/div[2]/div/button

EXPORT AS (outer HTML):
<button id="ember532" class="btn btn-secondary dropdown-toggle ember-view" type="button"> Export As&nbsp; </button>

XLSX Microsoft Excel (full XPath):
/html/body/div[1]/div[1]/div[1]/div[4]/div[2]/div[3]/div[2]/div/div/button[3]

XLSX Microsoft Excel (outer HTML):
<button class="dropdown-item" tabindex="-1" type="button" data-ember-action="" data-ember-action-536="536">XLSX (Microsoft Excel)</button>
Applescript: javascript hyperlink
 
 
Q