Question

How do I skip Logging in if already logged in.

  • 19 September 2022
  • 2 replies
  • 76 views

HI, I'm new to this!

 

I'm creating a bot that does something on a web page. The first step is to log into the site. However, since the bot will repeat itself, the second run, the bot is already logged into the website. How do I skip the logging on part if the user is already logged on?

 

Logic:

 

  1. Run Bot
  2. IF user is not logged in, log the user in
  3. IF the user is logged in, skip login and go to next steps

 

Thanks!


2 replies

Userlevel 5
Badge +9

There's likely some object on the page that appears only if you're already logged in - a field, a button, etc. You could use a conditional statement with object detection to see if that object exists - that way you;ll know if the bot is already logged in...conversely, you could do the same with the login button/fields and just check if they exist on the page or not...then you know if you need to log in.

Awesome! Thanks!

Reply