#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=Y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include #include #include #include #include #include #include #include #include "C:\Users\11003813\Desktop\AutoIT\au3WebDriver-1.4.0\wd_capabilities.au3" #include "C:\Users\11003813\Desktop\AutoIT\au3WebDriver-1.4.0\WinHttp.au3" #include "C:\Users\11003813\Desktop\AutoIT\au3WebDriver-1.4.0\WinHttpConstants.au3" Global $sSession SetupChrome() Func SetupChrome() ConsoleWrite('@@ (1881) :(' & @MIN & ':' & @SEC & ') SetupChrome()' & @CR) ;### Trace Function ;Local $IPORT = _WD_GETFREEPORT(9515,5600) ProcessClose("chromedriver.exe") _WD_Shutdown() If Number(StringLeft(_WD_GetBrowserVersion('CHROME'),3)) < 126 Then _WD_Option('Driver', 'chromedriver.exe') Local $IPORT = _WD_GETFREEPORT(9515,5600) ;MsgBox(0,$IPORT,Number(StringLeft(_WD_GetBrowserVersion('CHROME'),3)) ) ;_WD_Option('Port',9515);$IPORT); _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"debuggerAddress": "localhost:9222"}}}}' EndIf If Number(StringLeft(_WD_GetBrowserVersion('CHROME'),3)) > 125 Then _WD_Option('Driver', 'chromedriver.exe') Local $iPort = _WD_GetFreePort(5000, 5600) ;MsgBox(0,$iPort,Number(StringLeft(_WD_GetBrowserVersion('CHROME'),3))) _WD_Option('Port', $iPort) _WD_Option('DriverParams', '--port=' & $iPort & ' --verbose --log-path="' & "C:\Users\HP\Desktop\AutoIt" & '\chrome.log') ;_WD_Option('Port', 9515) ;_WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"debuggerAddress": "localhost:9222"}}}}' ;MsgBox(0,'',$sDesiredCapabilities) EndIf _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) EndFunc