Popup Window

uiautomation
studio

#1

Scenario: Am trying to do some data entry from csv to web, all is working fine, but some times for few datas error is coming in popup window, I want to close that popup window and need to carry on from next row in csv file. If I tried to if condition means don’t know what to give condition field (Enter a VB expression), How to get that popup window in VB expression. Please help me out.

Steps to reproduce:

Current Behavior:

Expected Behavior:

Studio/Robot/Orchestrator Version: Community Studio

Last stable behavior:
Last stable version:
OS Version:
Others if Relevant: (workflow, logs, .net version, service pack, etc):


#2

Hi @gokulvasant

Can you define at which state/step the pop up is showing up, if you know where its showing pop up exactly then you can use click activity to close the pop window by setting ContinueOnError property to True and TimeoutMS to less than 5 seconds. May i know why the pop error occurs, its always better to solve the error rather than bypassing it.

Regards,
Ranjith.


#3

Hi @gokulvasant,

  1. Use Image exists activity (in case citrix) or Element exists (in case of normal desktop).
  2. Get the value in boolean data type.
  3. Add a do while condition and specify the boolean value in the condition field (ex: found is true) coming from your image exists/element exists.
  4. Inside the loop attach window for popup. Take a click activity and click on the button u want to specify.
  5. It will search for the element using find activity and if it is found then it will click on OK/Cancel (inside do block) else it will jump to next activity.
    Regards,
    Jiban

#4

Thank you,

Hi I have tried through If condition popup is closed now, but execution never happening…

It’s mandatory we need to follow Do while??

Please clarify. Thank you.


#5

Hi,
There are few ways I get rid of the random popup.

One way is I create the Click Activity for the popup but add ContinueOnError to True and set a low Timeout parameter so it ignores the error if it’s not there. This method is more useful if the error is consistently in a spot of the process.

The other way is to use a Parallel Activity with the Click Activity with ContinueOnError to True and low Timeout in a Do While on one side, and on the other side set a variable at the very bottom to tell the Do While to exit (such as a boolean variable. Basically, it loops in parallel and clicks it once the element is found to be clicked.

You can also use Image clicks instead of Element clicks. You can also use Exists Activities and an If condition instead of ContinueOnError.

Thanks.


#6

@gokulvasant Yes because if you do not follow the do while loop it will not ignore if the popup is not coming.


#7

Thank you all,

It’s not working in do while, don’t know what mistake I made it, but it’s working fine in “on element appear”.

:smiley:


#8

How about using Get Active Window activity and passing a Alt+F4 hotkey in the catch block when a timeout exception is occurred in try block? Let us know if it worked.