Chrome Save as PDF file exists

I am trying to automate the process of going to a web page and saving it as PDF (or better printing it as PDF) with a certain name to a certain directory.
I could convince UiPath to do all, unless the file already exists. In this case, Chrome shows a message asking to confirm overwrite; I would then like to press ALT-y to say yes.
I first check with “Element Exists” if this confirm window is there, and if yes I use “Send Hotkey ‘chrome.exe Confirm’” to send the hotkey ALT-y
The test returns true, but when sending the hotkey the debugger says this step is “Faulted”.
I attach a screenshot and the XAML

SaveFactsheet.zip (2.1 KB)

Have you tried setting “WaitForReady” to “NONE” on the Send Hotkeys activity? Its found under Input > target in the properties window for the activity.

I’ve had similar issues before when typing/sending hotkeys into elements which were resolved by doing this.

I just looked at the XAML provided. Try also removing the “cls” element from the selector on the Send Hotkeys activity. I think the number in this element changes with each pop-up.

Example below:

@borreo as your certain about the name and file path then you could use path exists before you save it and if exists delete the file and then do a save.

Thanks, this did not help

thank you for your question, I solve my problem about send hotkey :grinning: