Skip to content

Commit dd54fd3

Browse files
authored
Merge pull request #907 from seleniumbase/protocol-option-for-grid
Add "protocol" option for selecting a Selenium Grid server
2 parents 966f169 + 7c71735 commit dd54fd3

File tree

15 files changed

+63
-13
lines changed

15 files changed

+63
-13
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ The code above will leave your browser window open in case there's a failure. (i
350350
--var2=DATA # (Extra test data. Access with "self.var2" in tests.)
351351
--var3=DATA # (Extra test data. Access with "self.var3" in tests.)
352352
--user-data-dir=DIR # (Set the Chrome user data directory to use.)
353+
--protocol=PROTOCOL # (The Selenium Grid protocol: http|https.)
353354
--server=SERVER # (The Selenium Grid server/IP used for tests.)
354355
--port=PORT # (The Selenium Grid port used by the test server.)
355356
--proxy=SERVER:PORT # (Connect to a proxy server:port for tests.)

docs/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ regex>=2021.4.4
22
tqdm>=4.60.0
33
livereload==2.6.3;python_version>="3.6"
44
joblib==1.0.1;python_version>="3.6"
5-
Markdown==3.3.4
5+
Markdown==3.3.4;python_version>="3.6"
6+
MarkupSafe==2.0.1;python_version>="3.6"
67
docutils==0.17.1
78
Jinja2==3.0.0;python_version>="3.6"
89
click==8.0.0

examples/raw_parameter_script.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
sb.headed = False
3636
sb.start_page = None
3737
sb.locale_code = None
38+
sb.protocol = "http"
3839
sb.servername = "localhost"
3940
sb.port = 4444
4041
sb.data = None

examples/test_hack_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ def test_hack_search(self):
1313
self.set_attribute('[action="/search"]', "action", "//bing.com/search")
1414
self.set_attributes('[value="Google Search"]', "value", "Bing Search")
1515
self.type('input[title="Search"]', "SeleniumBase GitHub")
16-
self.highlight('[value="Bing Search"]')
17-
self.click('[value="Bing Search"]')
16+
self.sleep(0.5)
17+
self.js_click('[value="Bing Search"]')
1818
self.highlight("h1.b_logo")
1919
self.highlight_click('a[href*="github.com/seleniumbase/SeleniumBase"]')
2020
self.switch_to_newest_window()

help_docs/customizing_test_runs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ SeleniumBase provides additional ``pytest`` command-line options for tests:
105105
--var2=DATA # (Extra test data. Access with "self.var2" in tests.)
106106
--var3=DATA # (Extra test data. Access with "self.var3" in tests.)
107107
--user-data-dir=DIR # (Set the Chrome user data directory to use.)
108+
--protocol=PROTOCOL # (The Selenium Grid protocol: http|https.)
108109
--server=SERVER # (The Selenium Grid server/IP used for tests.)
109110
--port=PORT # (The Selenium Grid port used by the test server.)
110111
--proxy=SERVER:PORT # (Connect to a proxy server:port for tests.)

integrations/brython/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
padding: 8px;
2222
}
2323
</style>
24-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.9.1/brython.js"></script>
24+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.9.2/brython.js"></script>
2525
</head>
2626
<body onload="brython()">
2727
<table>

integrations/brython/library.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
padding: 4px;
2222
}
2323
</style>
24-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.9.1/brython.js"></script>
24+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.9.2/brython.js"></script>
2525
</head>
2626
<body onload="brython(1)">
2727
<script id="ascript" type="text/python">

requirements.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ setuptools-scm>=6.0.1;python_version>="3.6"
1010
wheel>=0.36.2
1111
attrs>=21.2.0
1212
PyYAML>=5.4.1;python_version>="3.6"
13+
sortedcontainers==2.4.0
1314
certifi>=2020.12.5
1415
six==1.16.0
1516
nose==1.3.7
@@ -64,7 +65,7 @@ traitlets==5.0.5;python_version>="3.7"
6465
prompt-toolkit==1.0.18;python_version<"3.6"
6566
prompt-toolkit==3.0.18;python_version>="3.6"
6667
decorator==4.4.2;python_version<"3.5"
67-
decorator==5.0.7;python_version>="3.5"
68+
decorator==5.0.9;python_version>="3.5"
6869
ipython==5.10.0;python_version<"3.5"
6970
ipython==6.5.0;python_version>="3.5" and python_version<"3.6"
7071
ipython==7.16.1;python_version>="3.6" and python_version<"3.7"
@@ -83,7 +84,7 @@ toml==0.10.2
8384
Pillow==6.2.2;python_version<"3.5"
8485
Pillow==7.2.0;python_version>="3.5" and python_version<"3.6"
8586
Pillow==8.2.0;python_version>="3.6"
86-
rich==10.2.0;python_version>="3.6" and python_version<"4.0"
87+
rich==10.2.1;python_version>="3.6" and python_version<"4.0"
8788
tornado==5.1.1;python_version<"3.5"
8889
tornado==6.1;python_version>="3.5"
8990
pdfminer.six==20191110;python_version<"3.5"
@@ -93,7 +94,7 @@ pdfminer.six==20201018;python_version>="3.5"
9394
# ("pip install -r requirements.txt" also installs this, but "pip install -e ." won't.)
9495

9596
coverage==5.5
96-
pytest-cov==2.11.1
97+
pytest-cov==2.12.0
9798
flake8==3.7.9;python_version<"3.5"
9899
flake8==3.9.2;python_version>="3.5"
99100
pyflakes==2.1.1;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__ = "1.63.5"
2+
__version__ = "1.63.6"

seleniumbase/core/browser_launcher.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ def get_driver(
536536
headless=False,
537537
locale_code=None,
538538
use_grid=False,
539+
protocol="http",
539540
servername="localhost",
540541
port=4444,
541542
proxy_string=None,
@@ -602,6 +603,7 @@ def get_driver(
602603
browser_name,
603604
headless,
604605
locale_code,
606+
protocol,
605607
servername,
606608
port,
607609
proxy_string,
@@ -671,6 +673,7 @@ def get_remote_driver(
671673
browser_name,
672674
headless,
673675
locale_code,
676+
protocol,
674677
servername,
675678
port,
676679
proxy_string,
@@ -703,7 +706,7 @@ def get_remote_driver(
703706
device_pixel_ratio,
704707
):
705708
downloads_path = download_helper.get_downloads_folder()
706-
address = "http://%s:%s/wd/hub" % (servername, port)
709+
address = "%s://%s:%s/wd/hub" % (protocol, servername, port)
707710
desired_caps = {}
708711
extra_caps = {}
709712
if cap_file:

0 commit comments

Comments
 (0)