File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
selenium/webdriver/remote
test/unit/selenium/webdriver/remote Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 2727
2828
2929class 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" ]
Original file line number Diff line number Diff 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+
3132def 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+
3840def 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+
4447def test_server_with_port_out_of_range ():
4548 with pytest .raises (ValueError , match = "port must be 0-65535" ):
4649 Server (port = 99999 )
4750
51+
4852def test_stopping_server_thats_not_running ():
4953 server = Server ()
5054 with pytest .raises (RuntimeError , match = "Selenium server isn't running" ):
You can’t perform that action at this time.
0 commit comments