Getting a result of a Javascript

Hi,

i followed an old example of how to get some data from a website. Successfully, I open a new browser window, set it's URL to the target (search result) and now I want to run a JS on the page to get my result. But the result is always empty. I would like to put the result to a variable but also tried to display results.

The JS works, I checked in my browser console…

It seems so easy, but… :man_shrugging:

thanksfor apointer…

It may be worth checking the settings behind the drop-down chevron to the left of the text field:

With those settings, this is working on the page we are looking at:

const collection = document.getElementsByClassName("suggested-topics-wrapper")

return collection[0].innerText


Text of first class match.kmmacros (2.4 KB)

that's it - thank you.

And I thought I had a look at every chevron…

1 Like