After running my automation process for the first time, it successfully logged into the ACME website and completed the intended tasks. However, when I try to run the automation again, it doesn’t navigate to the login page since I’m already logged in from the previous session. This causes an error because the workflow is still trying to execute the login process.
How can I adjust my automation to handle the scenario where the user is already logged in and skip the login steps if necessary?
Use Check App State Activity and indicate thhe Home Page screen of ACME website.
In Target Appears do nothing and in Target Does not Appears keep the activities like type into to type the Username, Password and click the Login button.
Hie @mohammed.fuseini if you are working with modern activity use check app state activity and if you are still working with classic activity use element exist activity to check if the page is logged in or loged out … this help you to handle this error problem
cheers Happy Automation
If you are using the Classic activity then use element exist like
→ if the acme home page exist skip the login if not then login to the acme again.
If you are using the modern activity then use check app state(which is similar to the element exists in classic activity)
→ if the acme home page exist skip the login if not then login to the acme again.