Hi, I need to close a window in an application by clicking close button.
The problem is, the close button has same selectors in all window. How do I click this specific button in the window?
Even if I navigate to the particular window before sending click, it’ll close other windows sometimes (As I’m using simulate click, I need to use simulate click because normal click without that property is error prone)
Any help? Thanks!
Hey @manojj.yadav,
Try using the ‘Anchor-Base’ Activity.
You can find the ‘Total Paid Amount:’ Box and then if that exists you can click on the close button. Note that all these activities are classical.
1 Like
Add an anchor or another level to your selector.
The anchor can bet the Total Paid Amount
box.
The other level would be selecting the <webctrl tag='DIV'/>
row (or another one) in the selector editor and see if you can make the selector really specific using items available there.
1 Like
Try and repoduce your own cognitive thought pattern here.
If you, as a presumed human, would want to click that button, how do yo tell them appart?
Most likely by checking which (sub) window it is part of.
In UiPath you can do the same thing. If all the buttons are identical, the windows they are in won’t be. Try using anchors to link the button to the matching window, panel or whatever they are contained in.
1 Like
@Brian_Mathew_Maben , @Whynotrobot , @Jeroen_van_Loon
I did try anchor base, and it didn’t click at the close button, instead it clicked on the “cancel” button. I couldn’t edit the selectors of click activity inside the anchor base.
Hey @manojj.yadav ,
In the properties panel of the click activity under the ‘Target’ section there’s an option called ‘Selector’. Try editing in that
Edited and ran the workflow, it highlight the anchor correctly but clicks on the “close” button from another widow, weird.
Couldn’t solve this issue with anchor either. The anchor is highlighted correctly but the target is clicked at a different window.
Finally, I figured our that I can also close window by right clicking the bottom tabs (which are unique). So, I’m just gonna use it.
Thanks for responding!
2 Likes
Just a tip about anchors;
I didn’t mean the anchor-base. You can click on Indicate Anchor
in the Ui Explorer to add an anchor. The effect is different from the anchor-base activities, I suspect it might work in your case.
1 Like