Jump to content

Recommended Posts

Hello,

 

I've been trying for a past few days to get my vm to work properly. The problem is, that I have a vm running on esxi, which I would like to run GUI tests on, but after circa 2 hours after i close the web console connection it stops running. After i reconnect it starts running again without any problem for next two hours. Does anyone have any workaround for this?

 

Thank you

Link to post
Share on other sites
  • Moderators

@tomas_doubek welcome to the forum. Please share your code, so we are not guessing at what you are trying to accomplish inside the VM guest. Typically with anything that involves Sends or MouseClicks, it only works if you have an open, active connection.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to post
Share on other sites

Hello,

 

I am sorry, but I can't share my code because of an nda, but we aren't using send or mouseclicks, only controlsend and our own functions. The test runs completely normal when you are logged in the web console the whole time. But if you close, then after those two hours it stops and you have to open the console again

Link to post
Share on other sites
  • Moderators

Without any code, we would have to guess blindly, which isn't going to do you any favors. Please see the FAQ link below, and make sure you are not running any of the listed functions:

https://www.autoitscript.com/wiki/FAQ#Why_doesn.27t_my_script_work_on_a_locked_workstation.3F

Also, if you search the forum for "vm disconnect" there are a number of threads with users experiencing similar issues. You might look through these and determine if the cause for one of them is similar to your own.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to post
Share on other sites

Total guess here, but maybe because there is no mouse movement the VM is being put to sleep.

Try adding these calls to your script to fool windows into thinking it's playing a movie full-screen

;Add this line just before your script starts the long process
$aRet = DllCall('kernel32.dll', 'long', 'SetThreadExecutionState', 'long', 0x80000003)    ;Disable windows sleep mode by making it think it's playing a movie in full screen

;Before closing your script add this line
$aRet=DllCall('kernel32.dll','long','SetThreadExecutionState','long',0x80000000)         ;Remove the always on so it will go to sleep

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...