Finding UI element on Pop-up browser not working

Hi Team,

I have a task where I need to login to one web application and download an image. Am able to open browser and navigate to location where the image is located. Once I click on image download button then a pop-up window will be displayed and need to click on Accept button to continue for further activities.

The challenge am facing here is when pop up is displayed am able to click on Accept button if i keep the RDP machine window open but when I minimize or disconnect from RDP machine .It is unable to find the ui element of pop up box.
Getting below exception :
UiPath.Core.InvalidUiElementException: The UiElement is no longer valid —> System.Runtime.InteropServices.COMException: Invalid UI node. at UiPath.UiNodeClass.BringIntoView() at UiPath.Core.UiElement.BringToForeground() — End of inner exception stack trace — at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom) at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom) at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Can anyone help me how I can handle such scenario.

Regards
Pesari

A few questions:

Have you tried an ‘Attach window’ activity to allow the robot to maintain focus on the selector area?

Is there a try-catch to catch this error and allow you to continue with other activities? Or is this ‘Accept’ pop-up needed to complete the image download?

Hi
Yes, I tried below possibilities but none of them worked in my scenario.
My entire browser activity is surrounded by Try Catch block.

  1. I tried with Attach Window - tried with find element and also tried with image exist but didn’t worked.
  2. Tried with click image activity
  3. Tried with OCR Text activity
  4. Tried with Anchor base
  5. Tried with Activate activity
  6. Tried with Show Window - activate activity

After I click on Accept button on pop up then I will get another pop up where I need to click OK then it will allow me to download the image. Until I click accept and OK , I cannot download it.

It works fine when I keep my RDP window open but gets failed when I minimize my RDP window.

Regards
Venu

@venu_gopal1 - can you try

  • logoff RDP
  • change the robot type as unattended
  • change robot settings Login to console- Off
  • try to execute the job
  • monitor the logs for verification

Hi

I am not using orchestrator to schedule my robot to run for every hour and download the image. I would like to brief about the activity.
I have one Test Machine at remote location.I usually connect to that machine using a RDP. In that machine in installed UiPath Studio Pro Community Version 2020.4.0-beta.718.
I used windows scheduler to run the xaml file to execute for every one hour and send a notification whether image download is successfull or not and if any exception is occurred it will trigger a notification email and alert me about the exception.
Login to Console settings from UiPath.Setting(C:\Users\username\AppData\Local\UiPath)file is configured to “false”.

I tired to check the logs but I didn’t found much usefull information from it.

Regards
Venu

pls try uipath scheduler job with unattended robot for one execution and check.
as my per knowledge - windows scheduler is not recommended for schedule an activity.

Hi

Due to some restriction I was not allowed to use orchestrator as it was a community edition.

Is there any way to handle pop up and click on accept button .

Request to please assist me on this.

Regards
Pesari

In task scheduler. Did you set it to run whether user is logged on or not ?
image

I have faced this issue the when the RDP is minimized the bot fails.But runs when it is open. I have followed the steps i below link and the bot works when RDP is minimized
https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/in-minimized-window.html

Yes it is set to the same “run whether user is logged on or not”