Skip to content

Commit 3b25b65

Browse files
committed
[py] fix docs build, add chromium and edge to docs
1 parent 25ad82a commit 3b25b65

14 files changed

+64
-0
lines changed

py/docs/source/api.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,28 @@ Webdriver.chrome
6565
selenium.webdriver.chrome.service
6666
selenium.webdriver.chrome.webdriver
6767

68+
Webdriver.chromium
69+
------------------
70+
71+
.. currentmodule:: selenium.webdriver.chromium
72+
.. autosummary::
73+
:toctree: webdriver_chromium
74+
75+
selenium.webdriver.chromium.options
76+
selenium.webdriver.chromium.service
77+
selenium.webdriver.chromium.webdriver
78+
79+
Webdriver.edge
80+
--------------
81+
82+
.. currentmodule:: selenium.webdriver.edge
83+
.. autosummary::
84+
:toctree: webdriver_edge
85+
86+
selenium.webdriver.edge.options
87+
selenium.webdriver.edge.service
88+
selenium.webdriver.edge.webdriver
89+
6890
Webdriver.firefox
6991
-----------------
7092

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
selenium.webdriver.chromium.options
2+
===================================
3+
4+
.. automodule:: selenium.webdriver.chromium.options
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
selenium.webdriver.chromium.service
2+
===================================
3+
4+
.. automodule:: selenium.webdriver.chromium.service
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
selenium.webdriver.chromium.webdriver
2+
=====================================
3+
4+
.. automodule:: selenium.webdriver.chromium.webdriver
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
selenium.webdriver.edge.options
2+
===============================
3+
4+
.. automodule:: selenium.webdriver.edge.options
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
selenium.webdriver.edge.service
2+
===============================
3+
4+
.. automodule:: selenium.webdriver.edge.service
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
selenium.webdriver.edge.webdriver
2+
=================================
3+
4+
.. automodule:: selenium.webdriver.edge.webdriver

py/selenium/webdriver/chrome/service.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def __init__(self, executable_path, port=0, service_args=None,
2727
log_path=None, env=None):
2828
"""
2929
Creates a new instance of the Service
30+
3031
:Args:
3132
- executable_path : Path to the ChromeDriver
3233
- port : Port the service is running on

py/selenium/webdriver/chrome/webdriver.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def __init__(self, executable_path="chromedriver", port=DEFAULT_PORT,
3838
"""
3939
Creates a new instance of the chrome driver.
4040
Starts the service and then creates new instance of chrome driver.
41+
4142
:Args:
4243
- executable_path - Deprecated: path to the executable. If the default is used it assumes the executable is in the $PATH
4344
- port - Deprecated: port you would like the service to run, if left as 0, a free port will be found.

py/selenium/webdriver/chromium/options.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def add_extension(self, extension):
8787
"""
8888
Adds the path to the extension to a list that will be used to extract it
8989
to the ChromeDriver
90+
9091
:Args:
9192
- extension: path to the \\*.crx file
9293
"""
@@ -103,6 +104,7 @@ def add_encoded_extension(self, extension):
103104
"""
104105
Adds Base64 encoded string with extension data to a list that will be used to extract it
105106
to the ChromeDriver
107+
106108
:Args:
107109
- extension: Base64 encoded string with extension data
108110
"""
@@ -121,6 +123,7 @@ def experimental_options(self):
121123
def add_experimental_option(self, name, value):
122124
"""
123125
Adds an experimental option which is passed to chromium.
126+
124127
:Args:
125128
name: The experimental option name.
126129
value: The option value.

py/selenium/webdriver/chromium/service.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def __init__(self, executable_path, port=0, service_args=None,
2727
log_path=None, env=None, start_error_message=None):
2828
"""
2929
Creates a new instance of the Service
30+
3031
:Args:
3132
- executable_path : Path to the WebDriver executable
3233
- port : Port the service is running on

py/selenium/webdriver/chromium/webdriver.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def __init__(self, executable_path="chromedriver", port=DEFAULT_PORT,
3535
"""
3636
Creates a new WebDriver instance of the ChromiumDriver.
3737
Starts the service and then creates new WebDriver instance of ChromiumDriver.
38+
3839
:Args:
3940
- executable_path - Deprecated: path to the executable. If the default is used it assumes the executable is in the $PATH
4041
- port - Deprecated: port you would like the service to run, if left as 0, a free port will be found.
@@ -94,6 +95,7 @@ def launch_app(self, id):
9495
def get_network_conditions(self):
9596
"""
9697
Gets Chromium network emulation settings.
98+
9799
:Returns:
98100
A dict. For example:
99101
{'latency': 4, 'download_throughput': 2, 'upload_throughput': 2,
@@ -104,15 +106,19 @@ def get_network_conditions(self):
104106
def set_network_conditions(self, **network_conditions):
105107
"""
106108
Sets Chromium network emulation settings.
109+
107110
:Args:
108111
- network_conditions: A dict with conditions specification.
112+
109113
:Usage:
110114
::
115+
111116
driver.set_network_conditions(
112117
offline=False,
113118
latency=5, # additional latency (ms)
114119
download_throughput=500 * 1024, # maximal throughput
115120
upload_throughput=500 * 1024) # maximal throughput
121+
116122
Note: 'throughput' can be used to set both (for download and upload).
117123
"""
118124
self.execute("setNetworkConditions", {
@@ -124,6 +130,7 @@ def execute_cdp_cmd(self, cmd, cmd_args):
124130
Execute Chrome Devtools Protocol command and get returned result
125131
The command and command args should follow chrome devtools protocol domains/commands, refer to link
126132
https://chromedevtools.github.io/devtools-protocol/
133+
127134
:Args:
128135
- cmd: A str, command name
129136
- cmd_args: A dict, command args. empty dict {} if there is no command args
@@ -152,6 +159,7 @@ def get_issue_message(self):
152159
def set_sink_to_use(self, sink_name):
153160
"""
154161
Sets a specific sink, using its name, as a Cast session receiver target.
162+
155163
:Args:
156164
- sink_name: Name of the sink to use as the target.
157165
"""
@@ -160,6 +168,7 @@ def set_sink_to_use(self, sink_name):
160168
def start_tab_mirroring(self, sink_name):
161169
"""
162170
Starts a tab mirroring session on a specific receiver target.
171+
163172
:Args:
164173
- sink_name: Name of the sink to use as the target.
165174
"""
@@ -168,6 +177,7 @@ def start_tab_mirroring(self, sink_name):
168177
def stop_casting(self, sink_name):
169178
"""
170179
Stops the existing Cast session on a specific receiver target.
180+
171181
:Args:
172182
- sink_name: Name of the sink to stop the Cast session.
173183
"""

py/selenium/webdriver/edge/service.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def __init__(self, executable_path, port=0, verbose=False, log_path=None,
2626
Creates a new instance of the EdgeDriver service.
2727
EdgeDriver provides an interface for Microsoft WebDriver to use
2828
with Microsoft Edge.
29+
2930
:Args:
3031
- executable_path : Path to the Microsoft WebDriver binary.
3132
- port : Run the remote service on a specified port. Defaults to 0, which binds to a random open port

py/selenium/webdriver/edge/webdriver.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def __init__(self, executable_path='MicrosoftWebDriver.exe',
3333
"""
3434
Creates a new instance of the edge driver.
3535
Starts the service and then creates new instance of edge driver.
36+
3637
:Args:
3738
- executable_path - Deprecated: path to the executable. If the default is used it assumes the executable is in the $PATH
3839
- capabilities - Dictionary object with non-browser specific capabilities only, such as "proxy" or "loggingPref".

0 commit comments

Comments
 (0)