Hi All,
I was learning the Try Catch concept by practicing the below scenario.
Scenario: I have an excel file with two columns - “Username” & “Password”
1st row → invalid username invalid password
2nd row–> valid username valid password
Below are the steps that I am performing in this workflow
- Open the browser and open www.gmail.com
- Click “Use another account” option on gmail login page
→ After this step, system will display the “Email or phone” text field with “Next” button - Enter value in the “Email or phone” text field
- Click “Next” button
—> After this step, system will display the “Enter your password” field with “Next” button - Enter value in “Password” field
- Click “Next” button
—> After this step, user will be logged in successfully. - Click Logout button.
So, I have designed the bot using For Each activity and used Try Catch inside it.
For the first iteration, I got an exception after step 4 (because system won’t find the gmail account with invalid username) and flow went into the Catch section and notified the user about “invalid account” (Note: this is customised message just to inform user about invalid login credentials).
What I want to achieve here is after getting an exception, system should remove the invalid value from “Email or phone” text field, enter a valid value from 2nd row in the excel and follow step 4 to 7.
Actual Result: Workflow doesn’t move onto the 2nd row in the excel. And after sometime again throws a exception for not finding the correct UIelement.
Can someone please guide me OR suggest a correction in my workflow? Attaching my workflow file along with this query.
Gmail_Login_Using_TryCatch.xaml (27.0 KB)