This UDF will allow you to interact with any browser that supports the W3C WebDriver specifications. Supporting multiple browsers via the same code base is now possible with just a few configuration settings.
JSON UDF https://www.autoitscript.com/forum/topic/148114-a-non-strict-json-udf-jsmn
WinHTTP UDF https://www.autoitscript.com/forum/topic/84133-winhttp-functions/
HtmlTable2Array UDF (optional) https://www.autoitscr
I don't believe that this is currently possible with Chrome.
If you check your call to _WD_CreateSession, it is likely failing because there was a recent change by Google to this area. Try changing "chromeOptions" to "goog:chromeOptions"
Try changing $_WD_DEBUG to $_WD_DEBUG_None and the console window will be hidden
Hard to say without further details, but you can likely remove the call to _WD_WaitElement and also the line
_WD_ElementAction($sSession, $sElement, 'c