AndreyS Posted January 25 Author Share Posted January 25 Of course I could check it out. But to do this, your code must run in a loop and continuously. And it runs in seconds and ends. Link to comment Share on other sites More sharing options...
MojoeB Posted January 25 Share Posted January 25 of course you have to adapt the code to your code. Link to comment Share on other sites More sharing options...
AndreyS Posted January 25 Author Share Posted January 25 So then I didn’t understand the meaning of your code at all I understand that you want me to check whether your script will work after hibernation. Have you sent me the code that you want me to implement in my script? So he doesn’t decide or change anything at all. It only gives out some messages. Link to comment Share on other sites More sharing options...
MojoeB Posted January 25 Share Posted January 25 (edited) You can use the code to determine if the system has entered a sleep state. If the script detects that the system has indeed been in sleep mode, you can then proceed to terminate all processes related to WebDriver and restart them. This ensures that the functionality of WebDriver remains intact. Edited January 25 by MojoeB Link to comment Share on other sites More sharing options...
AndreyS Posted January 25 Author Share Posted January 25 Now it’s clear what this code is for. Thank you, MojoeB, but I myself know how to analyze it. The whole problem is what to do with the Webdriver, how to make it work again after hibernation. This is not clear. Link to comment Share on other sites More sharing options...
MojoeB Posted January 25 Share Posted January 25 to end the webdriver and session. _WD_DeleteSession($sSession) _WD_Shutdown($iWebDriver_PID,Default) - You get $iWebDriver_PID with $iWebDriver_PID = _WD_Startup() - $sSession with $sSession = _WD_CreateSession($sCapabilities) when I end Webdriver like this I also empty the variable $sCapabilities don't know if this is necessary probably not. Simply with - $sCapabilities = '' And then you just restart it Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now