Saint Razz
Saint Razz

Reputation: 53

UiPath: Unable to find UI Element corresponding to this selector

I'm taking a course on UiPath, but there are some subtle changes from the precise content presented by the course and what I'm working with. This appears to be because of subsequent updates or iterations to browsers, though this particular behavior is pretty consistent with Chrome and IE (example is using MS Edge).

The bot in question has a very simple sequence consisting of literally three nodes. It launches the Edge browser to go to the designated practice site 1, clicks on a 'download document' button 2 (these processes are both successful), and then attempts to click on the 'save as' option 3. Because this third action fails, the bot halts and subsequent instructions are never executed.

This option is the problematic one. The browser is generating this element that seems different from the one shown on the video. The video depicts a dialogue box from Internet Explorer that appears in the middle of the screen (I can't take a screenshot of this because the video shows up as all black when I try). The browsers I've tried produce a smaller dialogue box in the lower-left corner of the browser, like so:

Dialogue box

The error message itself gives some information, which I can intuit could be useful, but I'm not quite sure how to parse it. That 40% match near the bottom is the bot seeing another window I have open viewing the course. At the very bottom is Captain obvious letting me know that the selector was not found. The other parts of the message make it seem like it comes tantalizingly close, it sees an Edge window, even seems to see the 'save as' button (or is that what it's looking for without finding it).

Any suggestions? Thanks in advance!

Screenshot of error message

Upvotes: 2

Views: 10592

Answers (2)

craig157
craig157

Reputation: 385

Try using the 'Wait for Download' activity.

enter image description here

Then you won't have to worry about the Save / Open issue as the Output is 'FileInfo'

Upvotes: 0

kwoxer
kwoxer

Reputation: 3833

Your selector is too static. Never use IDs or use the * to accept any ID.

In your selector all you need to do is the following:

Change

<wnd ctrlid='1001'/>

to

<wnd ctrlid='*'/>

When this does not solve your issue, you will also need to delete the ID #32770 from wnd app.

Another idea is to use the fuzzy selector. But the fuzzy selector is not the best way in your example so go for the solution above.

Upvotes: 2

Related Questions