Skip to content

Commit 8b4814a

Browse files
committed
[py] Update docstrings
1 parent 74a7808 commit 8b4814a

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

py/selenium/webdriver/remote/server.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@
2727

2828

2929
class Server:
30-
"""Manage the Selenium Remote (Grid) Server.
30+
"""Manage a Selenium Grid (Remote) Server in standalone mode.
3131
32-
Selenium Manager will detect the server location and download it if necessary, unless an existing server path is specified.
32+
This class contains functionality for downloading the server and starting/stopping it.
33+
34+
For more information on Selenium Grid, see:
35+
- https://www.selenium.dev/documentation/grid/getting_started/
3336
3437
Parameters:
3538
-----------
@@ -89,8 +92,11 @@ def _wait_for_server(self, timeout=10):
8992
return False
9093

9194
def start(self):
92-
"""Start the server."""
95+
"""Start the server.
9396
97+
Selenium Manager will detect the server location and download it if necessary,
98+
unless an existing server path was specified.
99+
"""
94100
if self.path is None:
95101
selenium_manager = SeleniumManager()
96102
args = ["--grid"]

py/test/unit/selenium/webdriver/remote/remote_server_tests.py

+4
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,27 @@ def test_server_with_bad_path():
2828
with pytest.raises(OSError, match=re.escape(msg)):
2929
Server(path=path)
3030

31+
3132
def test_server_with_invalid_version():
3233
versions = ("0.0", "invalid")
3334
for version in versions:
3435
msg = f"Server.__init__() got an invalid version: '{version}'"
3536
with pytest.raises(TypeError, match=re.escape(msg)):
3637
Server(version=version)
3738

39+
3840
def test_server_with_invalid_port():
3941
port = "invalid"
4042
msg = f"Server.__init__() got an invalid port: '{port}'"
4143
with pytest.raises(TypeError, match=re.escape(msg)):
4244
Server(port=port)
4345

46+
4447
def test_server_with_port_out_of_range():
4548
with pytest.raises(ValueError, match="port must be 0-65535"):
4649
Server(port=99999)
4750

51+
4852
def test_stopping_server_thats_not_running():
4953
server = Server()
5054
with pytest.raises(RuntimeError, match="Selenium server isn't running"):

0 commit comments

Comments
 (0)