Search a online shop for several articles

Hi,

I need to check a shop if several articles are present in the catalog or not. Sounds like a simple repeated search... I came up with a little bit of JavaScript to grab the portion of interested, the number of search results. But when Iterating over the search phrases, the result I receive in KM is always one line behind. I don't know why. I am pretty sure it's the JS, because I set the KM var to empty between each run.
Anyone has an idea for me, please? Macro attached

Many thanks in advance

Jochen

search product at shop.kmmacros (6.3 KB)

btw. Using a new browser tab for each request does not help… but manually used in the console this script (and several variations of it) do not…