UiPath enters the name and date. If both exist in the database, it redirects to the next page and completes its work. If the details are not present in the database, a popup appears. UiPath should click the OK button on the popup, clear the name and date fields, and then enter the next name and date from the Excel file.
My question is: when UiPath enters the name and date and they are not found in the database, a popup appears. How can I check whether the popup exists or not, and which activity should I use to handle this?
If the popup exists, the output should be True ; if the popup does not exist, the output should be False . Based on this True/False result, the next steps should be executed accordingly.
Hi @Nihith_Novah ,
Use Element Exists activity (classic) or Check App State (modern) after submitting name/date.
Steps:
Drag Element Exists → indicate popup (title/OK button via UI Explorer)
Set timeout: 3-5 sec, output: popupExists (Boolean)
If popupExists = True:
Click OK
Clear fields (Set Text “”)
Else: Next Excel row
This gives True/False output exactly as needed. Works reliably for popups.
Hi @Nihith_Novah
Use Element Exists activity.
Indicate the popup (or OK button) and store the result in a Boolean variable.
True → popup exists → click OK, clear fields, move to next Excel row
False → popup not there → continue normal process
Hi @Nihith_Novah
You can use close popup activity.
The UiPath Documentation Portal - the home of all our valuable information. Find here everything you need to guide you in your automation journey in the UiPath ecosystem, from complex installation guides to quick tutorials, to practical business...
You can alternatively use check app state and then use click activity to close popup..
Let me know if you need any help .
@Nihith_Novah
Use check app state activity for this.
The UiPath Documentation Portal - the home of all our valuable information. Find here everything you need to guide you in your automation journey in the UiPath ecosystem, from complex installation guides to quick tutorials, to practical business...
“Thank you, Arjun. Suppose I am getting a message box instead of a pop notification. Can we use element exist for the message box as well?”
Hi @Nihith_Novah
Use Element Exists on the popup’s OK button.
Output a Boolean (e.g., popupExists)
If True → click OK, clear fields, enter next data
If False → continue to next page
Set a short timeout to avoid long waits.
hi @Nihith_Novah
Yes,Element Exists works perfectly for message boxes too—they’re just UI elements like popups.
Same steps:
Element Exists → Indicate the message box title/OK button via UI Explorer
Output: messageBoxExists (Boolean, 3-5 sec timeout)
If messageBoxExists = True: Click OK, clear fields
Works for Windows message boxes, browser alerts, app dialogs—any UI element.
Check App State (modern) also handles message boxes reliably with Target Appears/Not Appears blocks.
Hi Arjun, I tried the steps you suggested, but the Element Exists activity is always returning True , even when the message box does not pop up.
anwarkhan
(Anwar khan)
January 13, 2026, 10:02am
10
Hi Nihith,
Check selector of Element exist of Message box, Selectors of both should be different, try to avoid common attributes.