Try catch fails to check if a required Website already exists in a tab of a Browser

activities
trycatch
web

#1

Hello all, I want the robot to check weather a website say ‘xyz.com’ exits as tab in a chrome browser, if not it should launch chrome > enter the website and proceed further with other activities.
I have completed the above scenario and put both the workflows in a Try catch activity.
In a scenario where the tab of the website exists, the robot still launches a new web browser and enters the website.
Can someone please guide me on this?

Thank you,
Duwa

Attaching the workflow:
Main.xaml (13.5 KB)


#2

Hi @Duwa,

Instead of using get text, you can directly use “if exist activity” and use selectors to make sure that the required URL is selected. And then use if condition to make sure that the chrome is opened and then execute later part.

Regards,
hacky_wacky


#3

HI @Duwa,

Its working fine only, but in try catch block in finally block you you are opening again the new browser thats why opening new web browser

i have modified your code, please refer the xaml file
Main (10).xaml (15.1 KB)

Regards,
Arivu


#4

Thanks for the reply, I know got it ! :slight_smile:


#5

Thanks for your help bro.


#6

You are welcome bro @Duwa

Regards,
Arivu