I want to develop a print automation in a desktop application. When i indicate, the selector able to detect the ‘Print’ button in Print Dialog (already validate). But when i execute the robot, it always has an error around print dialog. It either says ‘Exception from HRESULT: 0x80040904’ or ‘Could not find the UI element corresponding to this selector’.
Does anyone ever have this issues? Are there any settings that i missed?
Hi @roboga_7,
can you please share your selector and any relevant information?
Maybe working with wildcards like “*” will help.
Otherwise, some buttons also have shortcuts, which can be really useful and more reliable in the long-run.
Best,
Alex
I’ve run into something similar with buttons that look perfectly visible but still can’t be found by the robot. In my case, the selector was either too specific or the print button was inside a different frame or container than expected. I’d check the selector in UI Explorer and see whether the element attributes are changing between runs. Also worth trying the modern UI automation activities or using a more stable attribute instead of relying on the full generated selector. If the button opens the system print dialog, that may need to be handled separately from the browser or application window.
@roboga_7
Not sure about which application you are using but try using one more Use application browser activity and indicate the application screen on which you have the Print button and then inside this new Use application activity add new Click activity and indicate the print button.
Try this and let me know.
Thank you everyone for the helps. I changed the UI Framework from Default to UI Automation, then adding the Check App State and choose strict, fuzzy, image selector, and using some wildcards. This steps works for me.