Skip to content

Commit 1a4b24c

Browse files
committed
Py: No-op. Fix, cleanup docstrings.
Especially: mentioning non-existing command.CommandExecutor was replaced by remote_connection.RemoteConnection. Make de facto required parameter 'desired_capabilities' first parameter in the constructor to highlight it.
1 parent a446b86 commit 1a4b24c

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

py/selenium/webdriver/remote/webdriver.py

+17-10
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,29 @@ class WebDriver(object):
4343
https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol
4444
4545
:Attributes:
46-
- command_executor - The command.CommandExecutor object used to execute commands.
47-
- error_handler - errorhandler.ErrorHandler object used to verify that the server did not return an error.
48-
- session_id - The session ID to send with every command.
49-
- capabilities - A dictionary of capabilities of the underlying browser for this instance's session.
50-
- proxy - A selenium.webdriver.common.proxy.Proxy object, to specify a proxy for the browser to use.
46+
- session_id - String ID of the browser session started and controlled by this WebDriver.
47+
- capabilities - Dictionaty of effective capabilities of this browser session as returned
48+
by the remote server. See https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities
49+
- command_executor - remote_connection.RemoteConnection object used to execute commands.
50+
- error_handler - errorhandler.ErrorHandler object used to handle errors.
5151
"""
5252

53-
def __init__(self, command_executor='http://127.0.0.1:4444/wd/hub',
54-
desired_capabilities=None, browser_profile=None, proxy=None, keep_alive=False):
53+
def __init__(self, desired_capabilities=None, command_executor='http://127.0.0.1:4444/wd/hub',
54+
proxy=None, browser_profile=None, keep_alive=False):
5555
"""
5656
Create a new driver that will issue commands using the wire protocol.
5757
5858
:Args:
59-
- command_executor - Either a command.CommandExecutor object or a string that specifies the URL of a remote server to send commands to.
60-
- desired_capabilities - Dictionary holding predefined values for starting a browser
61-
- browser_profile - A selenium.webdriver.firefox.firefox_profile.FirefoxProfile object. Only used if Firefox is requested.
59+
- desired_capabilities - A dictionary of capabilities to request when
60+
starting the browser session. Required parameter.
61+
- command_executor - Either a string representing URL of the remote server or a custom
62+
remote_connection.RemoteConnection object. Defaults to 'http://127.0.0.1:4444/wd/hub'.
63+
- proxy - A selenium.webdriver.common.proxy.Proxy object. The browser session will
64+
be started with given proxy settings, if possible. Optional.
65+
- browser_profile - A selenium.webdriver.firefox.firefox_profile.FirefoxProfile object.
66+
Only used if Firefox is requested. Optional.
67+
- keep_alive - Whether configure remote_connection.RemoteConnection to use
68+
HTTP keep-alive. Defaults to False.
6269
"""
6370
if desired_capabilities is None:
6471
raise WebDriverException("Desired Capabilities can't be None")

0 commit comments

Comments
 (0)