Macro doesn't open windows for file to upload when called from task scheduler

I have prepared a macro that works fine from UI Environment but when i call it from task scheduler, the window (where using Xtype when called from Ui environment I type file name and than click to upload) doesn’t show and macro finish regularly
I suppose for some reason the windows is closed but can’t figure which is the reason. I see from debug that the link where the dialog window is called highlights in green but the windows doesn’t appear.
thank you for the support.

this is the code
image

.

Xtype command work with focus on windows only, try to add in macro this command bringbrowsertoforeground

Remember xtype and xclick need focus on screen you can not use mouse or other software when use these commands I prefer for this reason not use xtype and xclick commands because i work with multiple browser in same time.
.
https://ui.vision/x/idehelp?cmd=bringbrowsertoforeground

Thank you but this doesn’t solve. Browser stays on foreground but when started from Task scheduler the window called from the click “linktext=Gestisci” (i see the click happening) doesn’t show and neither i find it under the browser still open (if somehow it has lost focus).

Try to add long delay (pause 5000) in every command and check.

In my test i see that xclick and xtype are slow command sometimes after some seconds perform the command in browser.

Try to add a delay in every command.

i just tried (up to 10 sec) but dialog windows doesn’t appear

@admin

Post ui vision version, browser type and OS version and waiting admin support

You are right
I’m using UI Vision RPA 5.8.8 , Google Chrome on Windows 10 pro.

Him just to clarify: What Window does not show? The UI.Vision GUI? Or Chrome? Or some web page dialog?

Ideally you can record a screenshot of the macro running manually, then we can see it.

Hello Ulrich
sorry for the late reply: I had 10 days vacation.
The page not showing is the dialog where the macro writes the file name to upload.
Line 10 in the macro
I’ll record soon the screenshot

Probably xpath wrong of few seconds of pause to execute xclick command

Remember xclick and xtype command require focus and are slow command in my pc usually require 3 seconds to click, standard command are instantly

Try to modify in your macro every click in Xclick and add pause 5000 in every command in your macro i see a wrong macro code because you use click and after Xtype, it’s wrong, Xtype require focus on screen and need xclick before and require pause and slow execution.

Thak you : after months i’m back and changing click to Xclik was the solution

1 Like