Problem with screenshot

Discuss RoboTask here
Post Reply
Micha
Posts: 7
Joined: Fri Feb 15, 2019 9:50 am

Problem with screenshot

Post by Micha »

Hi, i have a problem making a screenshot and i don't know how to solve the failure.

First load a website using Internet Explorer; the embedded browser doesn't work with the special site i need.
e.g. https://climate.rutgers.edu/snowcover/c ... 5&ui_set=2

I need the grafic (but it's some xml etc.)... ok.

Maximize the IE.
Do a screenshot... pause... bla bla... convert.

It work's fine when i test it! :)

...but... when i use the schedule the task stops... aborting with "Das Handle ist ungültig" (The handle is invalid) ...u can see the screenshot at the attached file.

What am I doing wrong?
screenshot.jpg
screenshot.jpg (489.74 KiB) Viewed 6865 times
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Problem with screenshot

Post by Oleg »

Send the task and whole task log to me for investigation, please (oleg(at)robotask.com)
Oleg Yershov
Micha
Posts: 7
Joined: Fri Feb 15, 2019 9:50 am

Re: Problem with screenshot

Post by Micha »

Sent the task-file to you via mail.
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Problem with screenshot

Post by Oleg »

I reproduced your problem.
It seems you try to take a screenshot in RDC (remote desktop connection)
It works fine if session is opened and not locked.

BUT if you lock the session it takes a snapshot of lock screen
If you disconnect the remote session the task get error "Handle is invalid"

Code: Select all

....
I: 15.02.2019 12:51:15: Executing "5.Screenshot"
E: 15.02.2019 12:51:15: The handle is invalid.: CaptureScreen failure
E: 15.02.2019 12:51:15: An error occurred. Step #5 (Screenshot).
E: 15.02.2019 12:51:15: Task execution is aborted
this error is not appear in local console, because local console is always connected. But you will get the screenshot of your lock-screen

You have to take a snapshot from the window, because the window always alive in the session.
BUT (again) Internet Explorer sometimes gives an empty screenshot.
You can take snapshot twice.
take snapshot, wait 1 sec and take snapshot again. Second screenshot always corrected
I tried this on RDC, with locked session and in disconnected session. It works.

Unfortunately other browsers (Chrome, FireFox) always gives empty screenshot

I will send the corrected example to you
Oleg Yershov
Post Reply