I have a problem and need some support in resolving it.
My application involves launching two separate admin panels in two different browsers. For simplicity, let’s call them:
Admin panel for setting status
Admin panel for performing verification
Unfortunately, during the flow execution, I often encounter the following error at the final stage: “Could not find the user-interface (UI) elements for this action.” The issue doesn’t occur consistently, and I haven’t been able to identify a logical reason for its intermittent appearance.
I noticed that it frequently happens when the BOT completes its work in the verification panel (number 2) and then switches to the status-setting panel (number 1). In this case, it seems that the browser continues to run in the background, which causes the error. When I manually switch to the browser with the correct panel, the problem does not occur.
Additionally, in UiPath Studio, I have set Resize window – Maximize, which should ensure that the BOT always operates on a visible browser window. Am I mistaken in this assumption?
Could you possibly provide any advice on this issue?
Hey @Arczi1223
It sounds like your issue might be happening because the browser window isn’t always in the foreground when the bot tries to work with it. One thing you could try is using the Activate activity right before interacting with each browser window. That way, you’re making sure it’s visible and active. Also, adding a bit of delay (Delay) might help ensure everything on the page is fully loaded before the bot starts doing its thing.
It’s also worth double-checking your selectors—try to make them as stable as possible, and avoid attributes that could change between sessions. You could even add the Check App State activity to make sure the elements are fully ready before the bot interacts with them.
Hope this helps! Let me know if any of these suggestions do the trick. Good luck, and happy automation!
Thank you very much for your quick response and advice. I will definitely try it out.
I’m 90% sure that the issue is caused by what you mentioned in the first paragraph, namely the BOT not working in the foreground. Could you give me some guidance on what I should check and adjust in Studio for the “Activate activity right before interacting with each browser window”?
As for the delay, I’ve already tried various adjustments, and while it has partially helped, the issue still persists.Cześć @pikorpa ,
Thank you very much for your quick response and advice. I will definitely try it out.
I’m 90% sure that the issue is caused by what you mentioned in the first paragraph, namely the BOT not working in the foreground. Could you give me some guidance on what I should check and adjust in Studio for the “Activate activity right before interacting with each browser window”?
As for the delay, I’ve already tried various adjustments, and while it has partially helped, the issue still persists.
Thank you very much for your quick response and advice. I will definitely try it out.
I’m 90% sure that the issue is caused by what you mentioned in the first paragraph, namely the BOT not working in the foreground. Could you give me some guidance on what I should check and adjust in Studio for the “Activate activity right before interacting with each browser window”?
As for the delay, I’ve already tried various adjustments, and while it has partially helped, the issue still persists.
Thanks for following up! To ensure the browser is always in focus, add the Activateactivity directly before any interaction (e.g., Click, Type Into). Just drag and drop Activate before each UI action and make sure its selector matches the window you’re interacting with.
Another great tip mentioned by @ashokkarale is to change the input method for activities to Simulate under the Use Application/Browser properties. This way, even if the browser isn’t in the foreground, it should still work without failing.
Hi what u can do is add sufficient delay
And try using check app state activity
Now when ever u want to switch between the browser you can use activate window and then check app state and then if it’s not activated again use activate window
Activate window before tying and click enable these property
Give sufficient delay between these activities
If u r using fuzzy selector change it from interactive to complete
Page load to wait until its complete
And if type into activities are causing this issue sometimes
What u can do is add click activity prior and
Then use set to clip activity and pass the value which u want to write and then inside type into use paste command
These are some of the work around we can use for this situation
activate is what you need to use…maximize will only maximize the window
also when you open the browsers get the output element and save it so that in subsequent use application/browser activties you can use tht variable as the input element or browser so that right window is identified
also in input methods of activities try using similate or chromium if supported whcih ensures to work on browser event when the window is not active
Instead of activating the window, you can set the Input Method to Simulate and use the Application Scope. This ensures that the process will succeed even if the window is not in the foreground.