Export to Excel works in 1 workflow, but when I invoke from main it can't find UI element

Apologies if I put this in the wrong topic/place. I’m very new to UiPath/automation but I’m having an issue that the more senior members of my team can’t explain. I currently have a main workflow that involves opening a filled-out form and (among other things) clicking the export-to-excel button on that form and doing a little manipulation with the spreadsheet.

The Main workflow currently has the steps to open the programs to get me to the correct screen. I also have an ExcelExport workflow. ExcelExport begins with confirming the application, then clicks the export button->clicks the download dialog window-> clicks “open.” After that it’s all in Excel and not relevant to this question.

When I run the entirety of the ExcelExport workflow, everything works fine. When I run all of it from main and invoke the ExcelExport process, it gets through the first 3 steps (confirm application, find/click export button, focus on the download window), and then it fails, saying that it cannot find the UI element for the “Open” link. Like I said, it finds this without any issue when running the ExcelExport workflow, so invoking it should be no different. I don’t have the faintest idea how this can work in the ExcelExport workflow but not work when I invoke the ExcelExport workflow.

Any input would be greatly appreciated.

Relevant additional info is that there are 0 arguments/variables at play here. I also tried doing a screen-record and using keyboard shortcuts to click open but that failed as well.

1 Like

Hope that click activity is within a Use application/browser activity or Attach Window activity
Only then it will be able to find the region of interaction and look of that specific element

If it’s already there then I would recommend to run in debug mode and see what is the exception
If it’s like cannot fine Ui element then I would recommend to open the selector editor of that activity and click REPAIR option so that it repairs the selector in dynamic way

Hope this helps
Let us know for any further clarification

Cheers @Nye_Kevin

Hello @Palaniyappan, thanks for replying. The activity is within a Use application activity so that wasn’t the issue, but while I was typing the response to this I had a coworker discover a fix to her problem and it ultimately solved mine!

It turns out that when indicating the target on screen I needed to change the UI Framework option from “Auto” to “UI Automation.” It’s unclear why this was entirely necessary - and the error she was getting was entirely different from mine - but upon changing this setting for the one particular click, the entire process works when running from Main.

Apparently it must have something to do with the compatibility of the application in question, but how in the world she figured out that this might work, I may never know.

Problem solved!

Thanks again.

1 Like