Open browser question

Hi,
I am reading product names from an Excel sheet. For each of the product name, I am opening amazon, ebay etc. pages to get product details. Every time I am opening amazon page, closing it, opening ebay page, closing it etc. until all products are over.
Is there a better way of doing this?

Thank you.

@A_Learner

after opening use navigate or go to url from the second iteration to open in same browser

alternately…you need not navigate also before loop use open and inside loop you need to only search by having all the browsers open

cheers

1 Like

Hi,
If you are trying to open multiple sites in a loop. Following approaches might be helpful !

  1. Open site(s) in InCognito mode to prevent saving of site Data & cookies.
  2. After performing action on one site, close browser & ReOpen for next loop.
  3. Use Navigate Browser activity which is capable of doing below listed actions :
    a. Go Back** - Navigates back in the current browser tab.
    b. Go Forward** - Navigates forward in the current browser tab.
    c. Go Home** - Navigates to the home or start page in the current browser tab.
    d. Refresh** - Reloads the web page that is currently displayed in the browser.
    e. Close Tab** - Closes the current browser tab.

By using above activity you can always navigate back to home or close tab before going for next site.

Hope this helps !!

Happy Automation

1 Like

Thank you @Anil_G. Can you explain option 2 please.

@A_Learner

Before loop keep all the different sits you need open in different browsers

Inside loop based on the output variables from each browser attach and seaech for product and extract

Cheers

1 Like

Thank you @Anil_G

What is the advantage of opening browser and closing in a loop vs
opening browser and attaching it in a loop and closing it in the loop.

Thank you,

@A_Learner

Closing inside loop is not good

In both options we either reload in same browser in first case

And in second we directly reuse via search

There is no closing inside loop

The advantage is it reduces the turn around time of always closing and oepning

Cheers

1 Like

One last question, when I attach browser using output UI Element from open browser,
for clicks and type into, how do I identify the element?

Thank you,

@A_Learner

While identifying use normal the first open browser itself…then further to it move it to separate use app/browser and pass variable…ideally it would support either ways

Cheers

1 Like

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