Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

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

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 119 Super User 2025 Season 1

#2
CU12050101-0 Profile Picture

CU12050101-0 26

#3
Nived_Nambiar Profile Picture

Nived_Nambiar 20 Super User 2025 Season 1

Overall leaderboard
Loading started