I started to create a script, but when creating a session error messages occur.
__WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData=
__WD_Post: StatusCode=400; ResponseText={"value":{"error":"invalid argument","message":"invalid argument: missing command parameters","stack...
__WD_Post ==> Invalid argument: {"value":{"error":"invalid argument","message":"invalid argument: missing command parameters","stacktrace":"Backtrace:\n\tOrdinal0 [0x00007FF6B81F5F92+4677522]\n\tOrdinal0 [0x00007FF6B7E9D577+1168759]\n\tOrdinal0 [0x00007FF6B7EED240+1495616]\n\tOrdinal0 [0x00007FF6B7E77F89+1015689]\n\tOrdinal0 [0x00007FF6B7F70EB1+2035377]\n\tOrdinal0 [0x00007FF6B7F3C72E+1820462]\n\tOrdinal0 [0x00007FF6B8113504+3749124]\n\tOrdinal0 [0x00007FF6B7F3D0FE+1822974]\n\tOrdinal0 [0x00007FF6B8208B54+4754260]\n\tOrdinal0 [0x00007FF6B7E77492+1012882]\n\tOrdinal0 [0x00007FF6B811DCA8+3792040]\n\tBaseThreadInitThunk [0x00007FF9E9697C24+20]\n\tRtlUserThreadStart [0x00007FF9EAECD721+33]\n"}}
_WD_CreateSession: {"value":{"error":"invalid argument","message":"invalid argument: missing command parameters","stacktrace":"Backtrace:\n\tOrdinal0 [0x00007FF6B81F5F92+4677522]\n\tOrdinal0 [0x00007FF6B7E9D577+1168759]\n\tOrdinal0 [0x00007FF6B7EED240+1495616]\n\tOrdinal0 [0x00007FF6B7E77F89+1015689]\n\tOrdinal0 [0x00007FF6B7F70EB1+2035377]\n\tOrdinal0 [0x00007FF6B7F3C72E+1820462]\n\tOrdinal0 [0x00007FF6B8113504+3749124]\n\tOrdinal0 [0x00007FF6B7F3D0FE+1822974]\n\tOrdinal0 [0x00007FF6B8208B54+4754260]\n\tOrdinal0 [0x00007FF6B7E77492+1012882]\n\tOrdinal0 [0x00007FF6B811DCA8+3792040]\n\tBaseThreadInitThunk [0x00007FF9E9697C24+20]\n\tRtlUserThreadStart [0x00007FF9EAECD721+33]\n"}}
_WD_CreateSession ==> Webdriver Exception: HTTP status = 400
Here is my code
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.14.5
Author: Oliver Tonn
Script Function:
Test PlasmaPQ
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
#include "wd_core.au3"
#include "wd_helper.au3"
#include <MsgBoxConstants.au3>
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <WindowsConstants.au3>
Main()
Func Main()
Local $sDesiredCapabilities, $sSession
Local $nMsg
; List of tests
Local $aTests[][2] = _
[["TMA", False], _
["Door Alarms", True]]
Local $iSpacing = 50
Local $iTestCnt = UBound($aTests) ; Determine number of tests
Local $aTestChoice[$iTestCnt]
Local $hGUI = GUICreate("PlasmaPQ Tests", 200, 150 + (20 * $iTestCnt), 100, 200, BitXOR($GUI_SS_DEFAULT_GUI, $WS_MINIMIZEBOX))
GUICtrlCreateLabel("Tests:", 15, 52)
For $i = 0 To $iTestCnt - 1
$aTestChoice[$i] = GUICtrlCreateRadio($aTests[$i][0], 70, $iSpacing + (20 * $i), 100, 17, $GUI_SS_DEFAULT_RADIO)
If $aTests[$i][1] Then GUICtrlSetState($aTestChoice[$i], $GUI_CHECKED)
Next
Local $iPos = $iSpacing + 20 * ($iTestCnt + 1)
Local $idBtnStartTest = GUICtrlCreateButton("Run Test", 60, $iPos + 40, 85, 25)
GUISetState(@SW_SHOW)
While 1
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop 2
Case $idBtnStartTest
SetupEdge()
_WD_Startup()
If @error <> $_WD_ERROR_Success Then
Exit -1
EndIf
$sSession = _WD_CreateSession($sDesiredCapabilities)
If @error = $_WD_ERROR_Success Then
_WD_Navigate($sSession, "http://www.is-tonn.de")
ExitLoop
Else
_WD_Shutdown()
Exit -1
EndIf
EndSwitch
WEnd
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
_WD_DeleteSession($sSession)
_WD_Shutdown()
ExitLoop
EndSwitch
WEnd
GUIDelete($hGUI)
EndFunc
Func SetupEdge()
_WD_Option('Driver', 'msedgedriver.exe')
_WD_Option('Port', 9515)
_WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\msedge.log"')
$sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "' & StringReplace(@ProgramFilesDir, "\", "/") & '/Microsoft/Edge/Application/msedge.exe", "excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}}'
EndFunc ;==>SetupEdge
I took a brief search on google, but didn't find an answer.