Log in check and if exists log out

Hi all,I want code like if already login then I want to logout.how to check it’s already login nd we need to logout.what will be the code scenario for it.any idea pls share

Hi @sayali_rokade

For that, when u open the browser, use the element exist to check for any element that is only available when the website is logged in

If the element is there, u can use the logout option to logout

Else it is login page

This way u can check that

Thanks and regards

Nived N


you can use Element Exist. It will give you Boolean Value.
After that you can use If Activity
then you can keep click activity for Log out.

You can use pick branch for this scenario just use element exist in conditions and if login exist use code in container to logout.

Use Flow Chart for this

Is login screen exists (Use Element Exits)
Condition (Login/Logout)
Perform Action (Login/Logout)