Well, since many people ask why I use UI functions, here is the explanation. What I need to do in Power Automate is update an Excel file that is stored in my company's cloud. For that, I need to extract data from an Excel file that I receive every day (e.g., excel_09_07_2024) and add it to the cloud Excel file. Additionally, I need to add screenshots of a specific page from the company website to the Excel file. The problem is that this cloud Excel file can only be opened on a web page, so the functions for Excel do not work, or at least they have been failing for me. Moreover, there are no predefined actions to add images to an Excel file (especially one opened in the web browser), so I have to use UI clicks.
Anyway, I have everything programmed and it works fine except for two issues. The first is that I use the "Open Excel" function to open the Excel file I receive daily (which is downloaded to my computer), but inside, I cannot use some UI elements I need to switch worksheets since these are assigned to a specific Excel file and do not work with the next day's file. The other problem is that for the screenshots, for some reason, the capture sometimes fails for some of them. I have no idea why, as it is always the same page.
I hope I explained myself well, and I hope you can help me.