Element Exists true issue

Hi,

In automating a windows application - I am clicking Search on Window1 opens Window2. Clickig Cancel on Window2 closes Window2 and puts me on Window1.

To make sure I am on Window1 and to do further clicks on window1, I am doing ElementExists(Window1). However this check is returning true even when the Window2 is open because Window1 is open when Window2 is open obviously.

How do I check if I am correctly on Window1? I do not want to do if window2 does not exist, I need a check to see if I am window1.

Thank you,

Hi @A_Learner

Give the close tab in the window 2 then it will obviously closes that particular window and make sure you give some delay before execution of the element exists activity.

Regards

Hi @A_Learner

Try the below flow:
Close tab should be indicated in the window2 container and the element exists should be in the Window1 as shown below. If possible ass some delay.

Regards

Thank you. That is the issue. Close Window2 does not always close Window2 for this application. That is why I need to know if Window2 closed and whether I am on window1.

Thanks

Hi @A_Learner

->Then give the element Exists for the element in window2 also and take the Boolean value and place in the IF condition.
->In Else sequence of the IF condition place the Element Exists of Window1 and other activities. So by this you can confirm whether the Window2 is closed or not.

Regards

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.