AndreyS Posted January 25, 2024 Author Posted January 25, 2024 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.
MojoeB Posted January 25, 2024 Posted January 25, 2024 of course you have to adapt the code to your code.
AndreyS Posted January 25, 2024 Author Posted January 25, 2024 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.
MojoeB Posted January 25, 2024 Posted January 25, 2024 (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, 2024 by MojoeB
AndreyS Posted January 25, 2024 Author Posted January 25, 2024 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.
MojoeB Posted January 25, 2024 Posted January 25, 2024 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
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