Jump to content

Recommended Posts

Posted

Hello,

I am using edge browser and using edge webdriver UDF to run my scripts. From few days when i run my scripts using Task scheduler, it starts but not opening the edge browser and hung in task bar. I also using updated webdriver as per edge browser. Below are the debug logs which i am getting like WinHTTP request timed out before Webdriver.... Strange is that sometimes it will load and sometimes not. I tried to set the below _wd_core but every 2 success again 2 times failure.

Global $_WD_HTTPTimeOuts[4] = [0, 60000, 30000, 80000]

_WD_IsLatestRelease: 
_WD_IsLatestRelease ==> Success
_WD_Startup: OS:    WIN_2012R2 WIN32_NT 9600 
_WD_Startup: AutoIt:    3.3.14.5
_WD_Startup: WD.au3:    0.4.1.1 (Update available)
_WD_Startup: WinHTTP:    1.6.4.2
_WD_Startup: Driver:    E:\path\msedgedriver.exe
_WD_Startup: Params:    --verbose
_WD_Startup: Port:    9515
__WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", "excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}}
__WD_Post: StatusCode=0; ResponseText=WinHTTP request timed out before Webdriver...
__WD_Post ==> Send / Recv error: WinHTTP request timed out before Webdriver
_WD_CreateSession: WinHTTP request timed out before Webdriver

Posted

The scripts will running fine with Task scheduler, but sometimes it will fail 10 times in a day and hunged in task bar what i have seen. The scripts were running fine from months, but i saw this strange behaviour from couple of days after whenever i changed the version of update drivers.

I am using 95.0.1020.30 edge driver  & edge browser 32 bit both same.

Posted

I tried with rewrite the script, and then run, sometimes full day no issue, but next day again it will hang and in task bar i saw the script and webdriver will not be killed and stayed until manually i end the task. and the script will hung and not read the commands.

Posted

As i am running multiple scripts one after another, is there any way to stop or kill the previous hunged script and driver, so that another script will not be impacted, becuase as same webdriver other scripts using too, so what i have seen if one scripts and webdriver hunged, another script will also get hunged and this keeps on going until manually i have to kill or stop or change the scripts to run smoothly. Shall i put the below in all the scripts so that it will kill the webdriver and scripts of previous script and then run with fresh.

Local $sDesiredCapabilities, $sSession, $sElement

_WD_DeleteSession($sSession)
_WD_Shutdown()

SetupEdge()
_WD_Startup()


$sSession = _WD_CreateSession($sDesiredCapabilities)

_WD_Navigate($sSession,$URL)

 

Posted
4 hours ago, MRAJ said:

Shall i put the below in all the scripts so that it will kill the webdriver and scripts of previous script and then run with fresh.

You shouldn't call _WD_DeleteSession here because you don't have a valid session ID at that point. But it's not a problem because _WD_Startup() will close an existing webdriver instance as long as you haven't changed the default behavior with _WD_Option('DriverClose')

Posted

Currently i am using the below , do i neeed to add _WD_Option('DriverClose') under Func SetupEdge() ?

Func SetupEdge()

_WD_Option('Driver', 'msedgedriver.exe')
_WD_Option('Port', 9515)
_WD_Option('DriverParams', '--verbose')

$sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "' & StringReplace (@ProgramFilesDir, "\", "/") & '/Microsoft/Edge/Application/msedge.exe", "excludeSwitches": [ "enable-automation"]}}}}'

EndFunc

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...