#include "..\wd_core.au3" #include "..\wd_helper.au3" Local $sDesiredCapabilities Local $aTestURLs[]=["https://github.com/mozilla/geckodriver/releases","https://www.autoitscript.com","https://www.dummies.com/web-design-development/site-development/a-sample-web-page-in-html/"] SetupChrome() _WD_Startup() If @error Then _ConsoleWrite("startup:" & @error) Exit EndIf $sSession = _WD_CreateSession($sDesiredCapabilities) If @error Then _ConsoleWrite("create session:" & @error) Exit EndIf While 1 For $i=0 To UBound($aTestURLs)-1 _WD_Navigate($sSession,$aTestURLs[$i]) If @error Then _ConsoleWrite("navigate:" & @error) ;~ Exit EndIf Sleep(Random(2000,3000,1)) Next WEnd Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 4444) ;~ _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true }}}}' EndFunc Func _ConsoleWrite($sData) Return ConsoleWrite($sData & @CRLF) EndFunc