Skip to content

Commit f0d6242

Browse files
authored
Merge pull request #1089 from seleniumbase/selenoid-grid-compatibility
Add compatibility with "Selenoid" Selenium grids
2 parents 85f7777 + 830d71e commit f0d6242

File tree

6 files changed

+38
-8
lines changed

6 files changed

+38
-8
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Desired capabilities example file for Selenoid Grid
2+
#
3+
# The same result can be achieved on the command-line with:
4+
# --cap-string='{"selenoid": "true"}'
5+
6+
capabilities = {
7+
"selenoid": "true",
8+
}

mkdocs_build/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ joblib==1.1.0;python_version>="3.6"
77
Markdown==3.3.6;python_version>="3.6"
88
MarkupSafe==2.0.1;python_version>="3.6"
99
pyparsing==3.0.6;python_version>="3.6"
10-
keyring==23.3.0;python_version>="3.6"
10+
keyring==23.4.0;python_version>="3.6"
1111
pkginfo==1.8.1;python_version>="3.6"
1212
Jinja2==3.0.3;python_version>="3.6"
1313
click==8.0.3;python_version>="3.6"
@@ -21,8 +21,8 @@ lunr==0.6.1;python_version>="3.6"
2121
nltk==3.6.5;python_version>="3.6"
2222
watchdog==2.1.6;python_version>="3.6"
2323
mkdocs==1.2.3;python_version>="3.6"
24-
mkdocs-material==7.3.6;python_version>="3.6"
25-
mkdocs-exclude-search==0.5.2;python_version>="3.6"
24+
mkdocs-material==8.0.1;python_version>="3.6"
25+
mkdocs-exclude-search==0.5.3;python_version>="3.6"
2626
mkdocs-simple-hooks==0.1.3
2727
mkdocs-material-extensions==1.0.3;python_version>="3.6"
2828
mkdocs-minify-plugin==0.5.0

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ packaging>=20.9;python_version<"3.6"
44
packaging>=21.3;python_version>="3.6"
55
setuptools>=44.1.1;python_version<"3.5"
66
setuptools>=50.3.2;python_version>="3.5" and python_version<"3.6"
7-
setuptools>=59.3.0;python_version>="3.6"
7+
setuptools>=59.4.0;python_version>="3.6"
88
setuptools-scm>=5.0.2;python_version<"3.6"
99
setuptools-scm>=6.3.2;python_version>="3.6"
1010
tomli>=1.2.2;python_version>="3.6"
@@ -109,7 +109,7 @@ Pillow==7.2.0;python_version>="3.5" and python_version<"3.6"
109109
Pillow==8.4.0;python_version>="3.6"
110110
typing-extensions==3.10.0.2;python_version<"3.6"
111111
typing-extensions==4.0.0;python_version>="3.6" and python_version<"3.8"
112-
rich==10.14.0;python_version>="3.6" and python_version<"4.0"
112+
rich==10.15.0;python_version>="3.6" and python_version<"4.0"
113113
tornado==5.1.1;python_version<"3.5"
114114
tornado==6.1;python_version>="3.5"
115115
pdfminer.six==20191110;python_version<"3.5"

seleniumbase/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "2.2.1"
2+
__version__ = "2.2.2"

seleniumbase/core/browser_launcher.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,10 +970,17 @@ def get_remote_driver(
970970
else:
971971
capabilities = chrome_options.to_capabilities()
972972
# Set custom desired capabilities
973+
selenoid = False
973974
for key in desired_caps.keys():
974975
capabilities[key] = desired_caps[key]
976+
if key == "selenoid" and desired_caps[key]:
977+
selenoid = True
975978
if selenium4:
976979
chrome_options.set_capability("cloud:options", capabilities)
980+
if selenoid:
981+
chrome_options.set_capability(
982+
"selenoid:options", {"enableVNC": True}
983+
)
977984
return webdriver.Remote(
978985
command_executor=address,
979986
options=chrome_options,
@@ -1007,10 +1014,17 @@ def get_remote_driver(
10071014
if headless:
10081015
capabilities["moz:firefoxOptions"] = {"args": ["-headless"]}
10091016
# Set custom desired capabilities
1017+
selenoid = False
10101018
for key in desired_caps.keys():
10111019
capabilities[key] = desired_caps[key]
1020+
if key == "selenoid" and desired_caps[key]:
1021+
selenoid = True
10121022
if selenium4:
10131023
firefox_options.set_capability("cloud:options", capabilities)
1024+
if selenoid:
1025+
firefox_options.set_capability(
1026+
"selenoid:options", {"enableVNC": True}
1027+
)
10141028
return webdriver.Remote(
10151029
command_executor=address,
10161030
options=firefox_options,
@@ -1175,9 +1189,17 @@ def get_remote_driver(
11751189
keep_alive=True,
11761190
)
11771191
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
11781196
if selenium4:
11791197
remote_options = ArgOptions()
11801198
remote_options.set_capability("cloud:options", desired_caps)
1199+
if selenoid:
1200+
remote_options.set_capability(
1201+
"selenoid:options", {"enableVNC": True}
1202+
)
11811203
return webdriver.Remote(
11821204
command_executor=address,
11831205
options=remote_options,

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
'packaging>=21.3;python_version>="3.6"',
124124
'setuptools>=44.1.1;python_version<"3.5"',
125125
'setuptools>=50.3.2;python_version>="3.5" and python_version<"3.6"',
126-
'setuptools>=59.3.0;python_version>="3.6"',
126+
'setuptools>=59.4.0;python_version>="3.6"',
127127
'setuptools-scm>=5.0.2;python_version<"3.6"',
128128
'setuptools-scm>=6.3.2;python_version>="3.6"',
129129
'tomli>=1.2.2;python_version>="3.6"',
@@ -228,7 +228,7 @@
228228
'Pillow==8.4.0;python_version>="3.6"',
229229
'typing-extensions==3.10.0.2;python_version<"3.6"', # <3.8 for "rich"
230230
'typing-extensions==4.0.0;python_version>="3.6" and python_version<"3.8"', # noqa: E501
231-
'rich==10.14.0;python_version>="3.6" and python_version<"4.0"',
231+
'rich==10.15.0;python_version>="3.6" and python_version<"4.0"',
232232
'tornado==5.1.1;python_version<"3.5"',
233233
'tornado==6.1;python_version>="3.5"',
234234
'pdfminer.six==20191110;python_version<"3.5"',

0 commit comments

Comments
 (0)