Scenario - Need to capture the price of a product on a website by opening one browser at a time and use data scraping to capture the data and extract into excel.
Ex: search for laptop price in one browser and open another browser and search for price of phone and so on and on, depending on the no.of entries in excel. When all search requests are completed, capture the data retrieved (Price) for all the products (Across all browsers) into excel. I have been using dynamic selector as the price is dynamic
Issue: Output excel has captured the price of first product correctly into excel. When second product was searched, it created same entry in excel that was executed in first browser. So, i am not able to understand why it is creating same entry although search results were different everytime new browser is executed. I am executing same url in multiple browser sessions.
Also, is there a way we can execute each condition in different tabs in chrome rather than opening new browser every time for testing each condition.
@TharUI,
After extracting first product from chrome then close the tab.that would close first instance and so that same entry are not there.
or
use navigate url activity in loop after every search url is refreshed in same tab.
ii) (Also, is there a way we can execute each condition in different tabs in chrome rather than opening new browser every time for testing each condition.)
Use send hot keys Ctrl + T it will open a new tab at end of each loop. Then use Navigate To activity to go to any URL
Thanks Naveen -
Navigate to activity worked like a charm in current browser and was able to get different data this time.
However, I have necessity to keep the existing browser open and do not refresh the current browser with new data. Rather than, i would need to open new tab and enter URL again. I tried CTRL+t followed by Navigate to option, it opened new tab but it went back to first tab refreshed browser with URL than second tab. I also tried click activity after CTRL+T, but it did not work. Also, if we do this approach, will browser will still retain the old values again and into extractdatatable.
@TharUI,
CTRL+t would just create a new tab but the control will be the previous page. to change control to new tab send hotkey CTRL+Tab this will send control to new tab and then use navigate to url.
Yes Praveen, I have tried that too. I even passed a variable from original browser into Navigate To. It opens new tab but Navigate to doesn’t enter URL on second tab. Still goes to first tab
Tried attach browser as another option and passed variable and included Navigate To inside that. That did not work either
@TharUI,
Please find the updated workflow attached.Main.xaml (8.1 KB)
I have modified your workflow a bit based on your requirements.
Let me know if you face any issue
Opened new tab and Selector is listed as below after clicking indicate on screen
wnd app=‘iexplore.exe’ cls=‘IEFrame’ title=‘New tab - Internet Explorer’
since it is selecting entire window, i also tried editing the selector as below
html title=‘New Tab’
which is same as your selector listed in your original file