WPTDriver goes to idle state when remote session is disconnected

Hi,

I am running WPTDriver on remote Windows Server 2012R2 machine, the problem is when I disconnect the remote session, wptdriver goes into idle state and doesn’t take any new work requests.

When I remote login again then it wakesup and picks up the work requests.

please let me know if anyone faced this issue and what could be the solution?

Any input could be of great help.

Hi Patrick,

I have upgraded to the latest WPTAgent and the above mentioned issue is resolved. The current issue I am facing now is the Video is not recorded when I disconnect the remote desktop session but when the remote session is Active the video is recording?

I tried to restart the agent machine and configured to run the wptagent.py from task scheduler after system restart but even then the video is not captured.

here is the output on the command prompt when I manually executed the agent and disconnected the remote session:

[gdigrab @ 000000a8853ca8c0] Capturing whole desktop as 1024x768x32 at (0,0)
[gdigrab @ 000000a8853ca8c0] Failed to capture image (error 5)
[gdigrab @ 000000a8853ca8c0] Could not find codec parameters for stream 0 (Video
: bmp, none, 251662 kb/s): unspecified size
Consider increasing the value for the ‘analyzeduration’ and ‘probesize’ options
Input #0, gdigrab, from ‘desktop’:
Duration: N/A, bitrate: 251662 kb/s
Stream #0:0: Video: bmp, none, 251662 kb/s, 10 fps, 1000k tbr, 1000k tbn, 10
00k tbc
Output #0, mp4, to ‘G:\wptagent-master\work\wptag01q-shr-08\180119_HP_Q.1.0\1_vi
deo.mp4’:
Output file #0 does not contain any stream

Let me know if you you have any input on this?

This issue is now resolved. Solution for both the above issues is to ensure that agent host machine doesn’t get locked when remote session is being disconnected.

run below command with administrative privileges to disconnect from remote session without locking the actual host

tscon %sessionname% /dest:console