How can I open a list of URL's in a single Chrome window

I ahve a bunch of URL’s in an excel sheet, I have tried to use the open browser activity but it opens me 1 window for each url I have seen some people with very similar issues but the tickets were already closed and I was not able to post on those
this is what I have for this function


but it is not working out for what I need, any idead on how I should do this?

Hi @goncalo.rocha,

You can use attach browser inside that ue navigate url activity option to open a link in same window.

Regards,
Arivu

@goncalo.rocha

Add a if condition in the for loop…And in the properties of for loop there is a property for index…Assign a variable.

Now use the if condition as index>0 …on the then side use attach browser and navigate url
and on the else side use open browser

Looks like duplicate

cheers

Hello @goncalo.rocha

Does that mean you need to open each url as a loop or you need to open each url as a tab in a chrome session??

If first case you can use the use existing windows session property enabled to ise the same chrome session.

Thanks

If it was a duplicate my apologies, it wasn’t meant to do it, regarding the issue it should open each url as a tab in chrome but I am only managing to make it open independent windows.
@Anil_G condition for the loop ur talking about the for each function or to create one? like this?


because it is still not attaching them

@goncalo.rocha

Now your conditions look proper…

So when index>0 basically in the then consition…you should have only attach browser and no open browser activity…

After attach browser use ctrl+t to open a new tab…and then use navigate activity to navigate to the required url on new tab

Ctrl+t can be send using type into activity [d(ctrl)]t[u(ctrl)]

Hope this helps

Cheers

@Anil_G, I think I get it, but when attaching it requests some sort of variable/value how can I specify it to be for the first URL opened? so i got “URL” as header of the column being rowindex “0”, for me to define the next line should it be something like row(“URL”).index(1) ?

@goncalo.rocha

Your for loop will take care of changing or looping through eqch row…
What you need to provide in url field any where is row("Urlcolumnname or index").ToString

And the index can be directly assigned in the for loop properties.it will automatically be incremented

Cheers

but when it opens the first time it won’t attach anything, but will already be on the second line when going to the first time it attaches, don’t I need the value of the first one as refence for the attachment process?
image
image

@goncalo.rocha

You can use a generic selector there…like

<html app=‘chrome.exe’ title = ‘*’ />

As there is only one chrome window…it will attach to that

Cheers

Ok, Thanks a lot tab issue solved only thing now is it is not navigating to specified URL’s
image
image
image

@goncalo.rocha

In attach browser you have a output property browser…try creating a variable for that and assign it to navigate url browser property

Because the error looks wierd as it is already. Connected to chrome/browser

Cheers

noticed that this works just right but when it opens the new tab it writes to the first tab and not the newly added one

@goncalo.rocha

Then do one this…After click ctrl+t …Try using another attach browser…but now use the title as the title of empty tab…which would always be constant again…so if we attach to the new tab and then use navigate it should work on the new tab now

Hope this helps

cheers

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