@@ -43,22 +43,29 @@ class WebDriver(object):
43
43
https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol
44
44
45
45
: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 .
51
51
"""
52
52
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 ):
55
55
"""
56
56
Create a new driver that will issue commands using the wire protocol.
57
57
58
58
: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.
62
69
"""
63
70
if desired_capabilities is None :
64
71
raise WebDriverException ("Desired Capabilities can't be None" )
0 commit comments