Get Attribute keeps returning 1st result in loop

I am trying to run a Get Attribute for URL (i.e. href) in a webpage through a loop. It loops through a list of webpages (each webpage containing a button with URL to be extracted) from a datatable (derived via data scraping).

However, the loop only keeps returning the button URL from the first webpage. Somehow, while the correct webpage opens in Chrome, the Get Attribute tool only extracts from the 1st webpage.

My outline is as below:


Hi @Ben_l

Use navigate to url or close the browser before the next loop so that the previous opened screen will be closed. Else will get the same first chrome windows button


Thanks @Anil_G, after putting Close Tab, it seems I need to edit the title to ‘*’ as well.

<html app='chrome.exe' title='*' />

My selector was originally based on the first webpage link, I’m assuming the Selector could no longer find that 1st webpage since it was closed by Close Tab.

Is it the correct way to do it? Or are there more elegant ways?

1 Like

Hi @Ben_l

Thats the exact perfect way to do it. You have to make the selector independent of the title or any other changes on the page

Hope this answers your question


Great @Anil_G, have done so.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.