new version under spoiler:
Currently function: _Example_Danp2()
Creates such Capabilities JSON string
{
"capabilities":{
"alwaysMatch":{
"acceptInsecureCerts":true
},
"firstMatch":[
{
"browserName":"chrome",
"goog:chromeOptions":{
"args":[
"start-maximized",
"disable-infobars",
"user-data-dir=C:\\Users\\Szef\\AppData\\Local\\Google\\Chrome\\User Data\\Default",
"--profile-directory=Default"
],
"prefs":{
"download.default_directory":"Z:\\!!!_SVN_AU3\\UDF_Forum\\Other_Members\\Test"
}
}
},
{
"browserName":"firefox",
"moz:firefoxOptions":{
"args":[
"-profile",
"C:\\Users\\Szef\\AppData\\Local\\Mozilla\\Firefox\\Profiles"
]
}
}
]
}
}
using this particular JSON string I was able to add new feature:
....
....
....
Local $_CHOOSEN_DRIVER = ''
If $IDYES = MsgBox($MB_YESNO + $MB_TOPMOST + $MB_ICONQUESTION + $MB_DEFBUTTON1, "Question", _
"Wchich browser do you wan to use ?" & @CRLF & @CRLF & _
"[YES] = FireFox [NO] = Chrome") Then
$_CHOOSEN_DRIVER = $_FIREFOX_DRIVER
Else
$_CHOOSEN_DRIVER = $_CHROME_DRIVER
EndIf
....
....
....
_WD_Option('Driver', $_CHOOSEN_DRIVER)
If $_CHOOSEN_DRIVER = $_FIREFOX_DRIVER Then _WD_Option('Port', 4444)
If $_CHOOSEN_DRIVER = $_CHROME_DRIVER Then _WD_Option('Port', 9515)
_WD_Startup()
....
....
This shows how to use different Browsers with the same Capabilities JSON string.