After a web application browser is killed and relaunched , it directly displays the homepage instead of the login page

After killing the browser and relaunching the same application again , the application is launched by displaying the homepage directly. The selector for this kind of homepage and homepage selector displayed after going through login steps seems different. Because of while other selectors are getting affected also . How to handle this scenario ? I am not able to find anything is common between these two selectors.
Incognito is not allowed in my project .

Hi @Ragavi_Rajasekar

Use Check App State and indicate the home page element once it gets logged in. When an exception occurs and the browser is relaunched it will check and if it’s already in Home page it will process the further steps.

Hope it helps

Hi @Ragavi_Rajasekar

Use check app state activity as @Parvathy suggested.
→ drag and drop check app state activity at the starting of the workflow and indicate the unique element on the home screen.
→ In Target appear block insert the click activity to click on logout button to logout from the account. After logout it will come to login page then the selectors will work.
→ Don’t insert any activity in target doesn’t appear block leave it blank.

The check app state will check for the element exist on the foreground or not in your case the element is home page. If hompage appear bot will click on logout. After logout the login page appears and the workflow will execute with out any errors.

Hope it helps!!

1 Like

Hi @Ragavi_Rajasekar

you can definitely use Check app state as suggested by @mkankatala and @Parvathy !!

also you can use Pick Branch Activity along with pick activity combination
set both the scenarios in branches and set them as a trigger

and in actions you can figure out what do in homepage ? and what to do in Login page ?

Hope this helps
happy automation.

Hello Ragavi,

Try using the incognito mode in chrome or in private mode in edge. That will always help while automating browser based automations as they are faster and they load every time from the top particularly when the step involves login page.

Above is another solution apart from what our fellow automation enthusiasts have posted.

Hope this helps you.

Happy automating.!

Thanks,
Gautham.

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