@@ -74,6 +74,7 @@ Global Const $__WDVERSION = "0.11.0"
74
74
Global Const $_WD_ELEMENT_ID = " element-6066-11e4-a52e-4f735466cecf"
75
75
Global Const $_WD_SHADOW_ID = " shadow-6066-11e4-a52e-4f735466cecf"
76
76
Global Const $_WD_EmptyDict = " {}"
77
+ Global Const $_WD_EmptyCaps = ' {"capabilities":{}}'
77
78
78
79
Global Const $_WD_LOCATOR_ByCSSSelector = " css selector"
79
80
Global Const $_WD_LOCATOR_ByXPath = " xpath"
@@ -208,7 +209,7 @@ Global $_WD_HTTPContentType = "Content-Type: application/json"
208
209
; Name ..........: _WD_CreateSession
209
210
; Description ...: Request new session from web driver.
210
211
; Syntax ........: _WD_CreateSession([$sCapabilities = Default])
211
- ; Parameters ....: $sCapabilities - [optional] Requested features in JSON format. Default is "{}"
212
+ ; Parameters ....: $sCapabilities - [optional] Requested features in JSON format. Default is '{"capabilities":{}}'
212
213
; Return values .: Success - Session ID to be used in future requests to web driver session.
213
214
; Failure - "" (empty string) and sets @error to $_WD_ERROR_Exception.
214
215
; Author ........: Danp2
@@ -222,7 +223,7 @@ Func _WD_CreateSession($sCapabilities = Default)
222
223
Local Const $sFuncName = " _WD_CreateSession"
223
224
Local $sSession = " " , $sMessage = ' '
224
225
225
- If $sCapabilities = Default Then $sCapabilities = $_WD_EmptyDict
226
+ If $sCapabilities = Default Then $sCapabilities = $_WD_EmptyCaps
226
227
227
228
Local $sResponse = __WD_Post($_WD_BASE_URL & " :" & $_WD_PORT & " /session" , $sCapabilities )
228
229
Local $iErr = @error
0 commit comments