@@ -970,10 +970,17 @@ def get_remote_driver(
970
970
else :
971
971
capabilities = chrome_options .to_capabilities ()
972
972
# Set custom desired capabilities
973
+ selenoid = False
973
974
for key in desired_caps .keys ():
974
975
capabilities [key ] = desired_caps [key ]
976
+ if key == "selenoid" and desired_caps [key ]:
977
+ selenoid = True
975
978
if selenium4 :
976
979
chrome_options .set_capability ("cloud:options" , capabilities )
980
+ if selenoid :
981
+ chrome_options .set_capability (
982
+ "selenoid:options" , {"enableVNC" : True }
983
+ )
977
984
return webdriver .Remote (
978
985
command_executor = address ,
979
986
options = chrome_options ,
@@ -1007,10 +1014,17 @@ def get_remote_driver(
1007
1014
if headless :
1008
1015
capabilities ["moz:firefoxOptions" ] = {"args" : ["-headless" ]}
1009
1016
# Set custom desired capabilities
1017
+ selenoid = False
1010
1018
for key in desired_caps .keys ():
1011
1019
capabilities [key ] = desired_caps [key ]
1020
+ if key == "selenoid" and desired_caps [key ]:
1021
+ selenoid = True
1012
1022
if selenium4 :
1013
1023
firefox_options .set_capability ("cloud:options" , capabilities )
1024
+ if selenoid :
1025
+ firefox_options .set_capability (
1026
+ "selenoid:options" , {"enableVNC" : True }
1027
+ )
1014
1028
return webdriver .Remote (
1015
1029
command_executor = address ,
1016
1030
options = firefox_options ,
@@ -1175,9 +1189,17 @@ def get_remote_driver(
1175
1189
keep_alive = True ,
1176
1190
)
1177
1191
elif browser_name == constants .Browser .REMOTE :
1192
+ selenoid = False
1193
+ for key in desired_caps .keys ():
1194
+ if key == "selenoid" and desired_caps [key ]:
1195
+ selenoid = True
1178
1196
if selenium4 :
1179
1197
remote_options = ArgOptions ()
1180
1198
remote_options .set_capability ("cloud:options" , desired_caps )
1199
+ if selenoid :
1200
+ remote_options .set_capability (
1201
+ "selenoid:options" , {"enableVNC" : True }
1202
+ )
1181
1203
return webdriver .Remote (
1182
1204
command_executor = address ,
1183
1205
options = remote_options ,
0 commit comments