Jump to content

Recommended Posts

Posted

Although this function has been running for a long time, it stopped working on 7th November.  It is called after my Global variables have been set
The function:
Func fSetupChrome()
    Local $sDesiredCapabilities
    _WD_Option("Driver", "C:\Program Files (x86)\AutoIt3\Include\chromedriver.exe")
    _WD_Option('Port', 9515)    ;<====Leave this line in (see comment below Danp2)
    _WD_Option('DriverParams', '--port=9515')

    Local $sProfilePath = @UserProfileDir & '\AppLocal\Google\Chrome\AutomationProfile'
    $sProfilePath = StringReplace($sProfilePath, '\', '\\')

    $sDesiredCapabilities = StringFormat( _
    '{' & _
    '    "capabilities": {' & _
    '        "firstMatch": [' & _
    '            {}' & _
    '        ],' & _
    '        "alwaysMatch": {' & _
    '            "browserName": "chrome",' & _
    '            "goog:chromeOptions": {' & _
    '                "args": [' & _
    '                    "--remote-debugging-port=9222",' & _
    '                    "--user-data-dir=%s",' & _
    '                    "--profile-directory=Default"' & _
    '                ]' & _
    '            }' & _
    '        }' & _
    '    }' & _
    '}', $sProfilePath)
    _WD_Startup()
    $sSession = _WD_CreateSession($sDesiredCapabilities)
    _WD_Window($sSession, 'rect', '{"x":0,"y":0,"width":1300,"height":1400}')
EndFunc   ;==>fSetupChrome

The consle output now is:
_WD_Option ==> Success [0] : Parameters:   Option=Driver   Value=C:\Program Files (x86)\AutoIt3\Include\chromedriver.exe
_WD_Option ==> Success [0] : Parameters:   Option=Port   Value=9515
_WD_Option ==> Success [0] : Parameters:   Option=DriverParams   Value=--port=9515
"C:\Program Files (x86)\AutoIt3\Include\wd_helper.au3" (3301) : ==> Variable subscript badly formatted.:
$aRes[$i][1] = $aConnState[$aRes[$i][0] - 1]
$aRes[$i][1] = $aConnState[^ ERROR
->19:55:54 AutoIt3.exe ended.rc:1

I'm running Chrome Version 157.0.8103.51 and chromedriver.exe is version 157.0.8103.50. The wd_*.au3 files are dated 19/03/2026

Can anybody offer some advice
 

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
×
×
  • Create New...