Hello,
I am trying to get the URL to a file on a webpage using a JavaScript setp in Power Desktop Automate.
The URL is that of the icon show below :

To do so, I tried writing a JavaScript step as follows:
var dllink = window.location.origin + document.querySelector("#container > div > div > div.page.p-conso > div.table.table-facture > div > div:nth-child(1) > div:nth-child(3) > a").getAttribute("href");
WScript.echo(dllink);
Executing in the chrome console the variable, i.e. just :
window.location.origin + document.querySelector("#container > div > div > div.page.p-conso > div.table.table-facture > div > div:nth-child(1) > div:nth-child(3) > a").getAttribute("href")
Gives out the correct link.
However, when I try to display the %JavascriptOutput% in a message box, it comes out empty.
Would you have any idea why this JavaScript is not working in Power Desktop Automate while working in the Chrome console ?
I'd be very grateful if someone had a solution to my problem. Thank you in advance.