******************************************
System Sleep code :
******************************************
As automation tester we have to run the automation scripts as Batch over night,usually system will get sleep by 5 min to avoid that we can use below sleep code to keep system running without sleep
set c=wscript.createobject("wscript.shell")
for j=1 to 100
c.sendkeys "^"
wscript.sleep 50000
j=j-1
next
take above code and save as VBS file, and just double click on same file so that system will not sleep
Note : If you have admin rights you can change system sleep settings, but above code will help us even you dont have admin rights
System Sleep code :
******************************************
As automation tester we have to run the automation scripts as Batch over night,usually system will get sleep by 5 min to avoid that we can use below sleep code to keep system running without sleep
set c=wscript.createobject("wscript.shell")
for j=1 to 100
c.sendkeys "^"
wscript.sleep 50000
j=j-1
next
take above code and save as VBS file, and just double click on same file so that system will not sleep
Note : If you have admin rights you can change system sleep settings, but above code will help us even you dont have admin rights
No comments:
Post a Comment