Skip to content

Commit c30c071

Browse files
authored
_WD_CreateSession: Revise default capabilities (#412)
1 parent 019561e commit c30c071

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

wd_core.au3

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Global Const $__WDVERSION = "0.11.0"
7474
Global Const $_WD_ELEMENT_ID = "element-6066-11e4-a52e-4f735466cecf"
7575
Global Const $_WD_SHADOW_ID = "shadow-6066-11e4-a52e-4f735466cecf"
7676
Global Const $_WD_EmptyDict = "{}"
77+
Global Const $_WD_EmptyCaps = '{"capabilities":{}}'
7778

7879
Global Const $_WD_LOCATOR_ByCSSSelector = "css selector"
7980
Global Const $_WD_LOCATOR_ByXPath = "xpath"
@@ -208,7 +209,7 @@ Global $_WD_HTTPContentType = "Content-Type: application/json"
208209
; Name ..........: _WD_CreateSession
209210
; Description ...: Request new session from web driver.
210211
; 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":{}}'
212213
; Return values .: Success - Session ID to be used in future requests to web driver session.
213214
; Failure - "" (empty string) and sets @error to $_WD_ERROR_Exception.
214215
; Author ........: Danp2
@@ -222,7 +223,7 @@ Func _WD_CreateSession($sCapabilities = Default)
222223
Local Const $sFuncName = "_WD_CreateSession"
223224
Local $sSession = "", $sMessage = ''
224225

225-
If $sCapabilities = Default Then $sCapabilities = $_WD_EmptyDict
226+
If $sCapabilities = Default Then $sCapabilities = $_WD_EmptyCaps
226227

227228
Local $sResponse = __WD_Post($_WD_BASE_URL & ":" & $_WD_PORT & "/session", $sCapabilities)
228229
Local $iErr = @error

0 commit comments

Comments
 (0)