Support > Forums > OpenBots Studio > If Statement

If Statement

Dustin Krick

  • Reporter
  • Calender Icon March 06,2023 at 5:24 PM

How would I build an if statement if a customer is found to click close, but if a customer is not found then to also click the close button.

It would technically be different screens that would pop up.

This forum has 314 topics, 681 replies, and was last updated 21 days ago by Support Agent

Rushabh Arbat

  • Participant
  • Calender Icon March 07,2023 at 6:12 PM

Hi Dustin Krick,

You first need to check if the customer exists, if it does, then click on close button in first screen. If no customer is found, then close pop-up on second screen.

For those type of cases we have the Desktop Element Exist command, it determines whether a desktop element exists in targeted window, and returns a Boolean output.

You can use that output Boolean variable as input for your if condition. If element exists Boolean returns true, then use the Desktop Click Element command on close button in targeted screen.

Please let me know if you have any questions.

Thanks

You are not authorized to reply, please click here to login and add your reply to this topic.