Skip to main content

Notifications

Community site session details

Community site session details

Session Id : vOjqmIgPU4oSkOq0yym6tU
Power Automate - Power Automate Desktop
Unanswered

Upload a file using Mouse OCR action is not working on Virtual Machine

Like (0) ShareShare
ReportReport
Posted on 27 May 2022 14:51:13 by 4

I just Uploaded files into a website using a flow in PAD, But it's only working with mouse action, not working when using any other options in PAD.

And when I'm using it in the local system then it's working fine but while I'm using Azure VM that upload part is failed. It's working only when I'm watching the workflow by taking the VM remotely and If I'm minimizing the remote window also it throws the same error. 

 

I received this error message :

 

Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: Failed to move mouse. ---> System.ComponentModel.Win32Exception: The handle is invalid
at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation)
at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize)
at Microsoft.Flow.RPA.Desktop.Modules.Image.Utilities.ImageFunctions.GrabScreenshot(Boolean entireScreenInsteadOfForegroundWindow, Boolean wholeOfForegroundWindowOrJustClientArea)
at Microsoft.Flow.RPA.Desktop.Modules.OCR.Utilities.Utilities.GetImageForOCR(OCRSource source, SourceScanMode sourceScanMode, Nullable`1 scanRegionX1, Nullable`1 scanRegionY1, Nullable`1 scanRegionX2, Nullable`1 scanRegionY2, IEnumerable`1 imagesToFind, Int32 tolerance, Boolean waitForImage, Boolean timeoutSet, Nullable`1 timeout, Nullable`1 searchRegionImageX1, Nullable`1 searchRegionImageY1, Nullable`1 searchRegionImageX2, Nullable`1 searchRegionImageY2, Action suspendSecureScreen, Action restoreSecureScreen, String imageFilepath, IImageFinder imageFinder)
at Microsoft.Flow.RPA.Desktop.Modules.MouseAndKeyboard.Actions.MouseAndKeyboardActions.FindTextOnScreen(OCREngineVariant ocrEngineSafe, String textToFind, OCRSource ocrSource, SourceScanMode sourceScanMode, Nullable`1 scanRegionX1, Nullable`1 scanRegionY1, Nullable`1 scanRegionX2, Nullable`1 scanRegionY2, IEnumerable`1 imagesToFind, Int32 tolerance, Boolean waitForText, Boolean waitForTextToAppear, Boolean timeoutSet, Nullable`1 timeout, Nullable`1 searchRegionImageX1, Nullable`1 searchRegionImageY1, Nullable`1 searchRegionImageX2, Nullable`1 searchRegionImageY2, Func`1 shouldKeepGoing, Boolean isRegex, IImageFinder imageFinder, Int32 occurance)
at Microsoft.Flow.RPA.Desktop.Modules.MouseAndKeyboard.Actions.MouseAndKeyboardActions.MoveMouseToTextOnScreen(OCREngineObject ocrEngine, String textToFind, Int32 occurrence, Nullable`1 searchRegionX1, Nullable`1 searchRegionY1, Nullable`1 searchRegionX2, Nullable`1 searchRegionY2, Nullable`1 searchRegionImageX1, Nullable`1 searchRegionImageY1, Nullable`1 searchRegionImageX2, Nullable`1 searchRegionImageY2, PositionOnImage mousePositionOnImage, Int32 offsetX, Int32 offsetY, SearchTarget ocrSource, SourceScanMode sourceScanMode, Int32 tolerance, Boolean waitForText, Boolean timeoutSet, Int32 timeout, Boolean clickOnImage, MovementStyle mouseMovementStyle, Boolean waitBeforeClick, Int32 waitSecondsBeforeClick, Boolean isRegex, List`1 imagesToFind, ClickType clickType, IImageFinder imageFinder)
--- End of inner exception stack trace ---
at Microsoft.Flow.RPA.Desktop.Modules.MouseAndKeyboard.Actions.MoveMouseToTextOnScreenWithOCRAction.Execute(ActionContext context)
at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

 

 

 

 

Anybody, please help me.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 4 Super User 2025 Season 1

#2
KO-05050229-0 Profile Picture

KO-05050229-0 2

#2
stampcoin Profile Picture

stampcoin 2

Overall leaderboard
Loading started