Skip to content

Commit

Permalink
[py] fix docs build, add chromium and edge to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lmtierney committed Aug 2, 2019
1 parent 25ad82a commit 3b25b65
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 0 deletions.
22 changes: 22 additions & 0 deletions py/docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,28 @@ Webdriver.chrome
selenium.webdriver.chrome.service
selenium.webdriver.chrome.webdriver

Webdriver.chromium
------------------

.. currentmodule:: selenium.webdriver.chromium
.. autosummary::
:toctree: webdriver_chromium

selenium.webdriver.chromium.options
selenium.webdriver.chromium.service
selenium.webdriver.chromium.webdriver

Webdriver.edge
--------------

.. currentmodule:: selenium.webdriver.edge
.. autosummary::
:toctree: webdriver_edge

selenium.webdriver.edge.options
selenium.webdriver.edge.service
selenium.webdriver.edge.webdriver

Webdriver.firefox
-----------------

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
selenium.webdriver.chromium.options
===================================

.. automodule:: selenium.webdriver.chromium.options
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
selenium.webdriver.chromium.service
===================================

.. automodule:: selenium.webdriver.chromium.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
selenium.webdriver.chromium.webdriver
=====================================

.. automodule:: selenium.webdriver.chromium.webdriver
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
selenium.webdriver.edge.options
===============================

.. automodule:: selenium.webdriver.edge.options
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
selenium.webdriver.edge.service
===============================

.. automodule:: selenium.webdriver.edge.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
selenium.webdriver.edge.webdriver
=================================

.. automodule:: selenium.webdriver.edge.webdriver
1 change: 1 addition & 0 deletions py/selenium/webdriver/chrome/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def __init__(self, executable_path, port=0, service_args=None,
log_path=None, env=None):
"""
Creates a new instance of the Service
:Args:
- executable_path : Path to the ChromeDriver
- port : Port the service is running on
Expand Down
1 change: 1 addition & 0 deletions py/selenium/webdriver/chrome/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def __init__(self, executable_path="chromedriver", port=DEFAULT_PORT,
"""
Creates a new instance of the chrome driver.
Starts the service and then creates new instance of chrome driver.
:Args:
- executable_path - Deprecated: path to the executable. If the default is used it assumes the executable is in the $PATH
- port - Deprecated: port you would like the service to run, if left as 0, a free port will be found.
Expand Down
3 changes: 3 additions & 0 deletions py/selenium/webdriver/chromium/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def add_extension(self, extension):
"""
Adds the path to the extension to a list that will be used to extract it
to the ChromeDriver
:Args:
- extension: path to the \\*.crx file
"""
Expand All @@ -103,6 +104,7 @@ def add_encoded_extension(self, extension):
"""
Adds Base64 encoded string with extension data to a list that will be used to extract it
to the ChromeDriver
:Args:
- extension: Base64 encoded string with extension data
"""
Expand All @@ -121,6 +123,7 @@ def experimental_options(self):
def add_experimental_option(self, name, value):
"""
Adds an experimental option which is passed to chromium.
:Args:
name: The experimental option name.
value: The option value.
Expand Down
1 change: 1 addition & 0 deletions py/selenium/webdriver/chromium/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def __init__(self, executable_path, port=0, service_args=None,
log_path=None, env=None, start_error_message=None):
"""
Creates a new instance of the Service
:Args:
- executable_path : Path to the WebDriver executable
- port : Port the service is running on
Expand Down
10 changes: 10 additions & 0 deletions py/selenium/webdriver/chromium/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def __init__(self, executable_path="chromedriver", port=DEFAULT_PORT,
"""
Creates a new WebDriver instance of the ChromiumDriver.
Starts the service and then creates new WebDriver instance of ChromiumDriver.
:Args:
- executable_path - Deprecated: path to the executable. If the default is used it assumes the executable is in the $PATH
- port - Deprecated: port you would like the service to run, if left as 0, a free port will be found.
Expand Down Expand Up @@ -94,6 +95,7 @@ def launch_app(self, id):
def get_network_conditions(self):
"""
Gets Chromium network emulation settings.
:Returns:
A dict. For example:
{'latency': 4, 'download_throughput': 2, 'upload_throughput': 2,
Expand All @@ -104,15 +106,19 @@ def get_network_conditions(self):
def set_network_conditions(self, **network_conditions):
"""
Sets Chromium network emulation settings.
:Args:
- network_conditions: A dict with conditions specification.
:Usage:
::
driver.set_network_conditions(
offline=False,
latency=5, # additional latency (ms)
download_throughput=500 * 1024, # maximal throughput
upload_throughput=500 * 1024) # maximal throughput
Note: 'throughput' can be used to set both (for download and upload).
"""
self.execute("setNetworkConditions", {
Expand All @@ -124,6 +130,7 @@ def execute_cdp_cmd(self, cmd, cmd_args):
Execute Chrome Devtools Protocol command and get returned result
The command and command args should follow chrome devtools protocol domains/commands, refer to link
https://chromedevtools.github.io/devtools-protocol/
:Args:
- cmd: A str, command name
- cmd_args: A dict, command args. empty dict {} if there is no command args
Expand Down Expand Up @@ -152,6 +159,7 @@ def get_issue_message(self):
def set_sink_to_use(self, sink_name):
"""
Sets a specific sink, using its name, as a Cast session receiver target.
:Args:
- sink_name: Name of the sink to use as the target.
"""
Expand All @@ -160,6 +168,7 @@ def set_sink_to_use(self, sink_name):
def start_tab_mirroring(self, sink_name):
"""
Starts a tab mirroring session on a specific receiver target.
:Args:
- sink_name: Name of the sink to use as the target.
"""
Expand All @@ -168,6 +177,7 @@ def start_tab_mirroring(self, sink_name):
def stop_casting(self, sink_name):
"""
Stops the existing Cast session on a specific receiver target.
:Args:
- sink_name: Name of the sink to stop the Cast session.
"""
Expand Down
1 change: 1 addition & 0 deletions py/selenium/webdriver/edge/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def __init__(self, executable_path, port=0, verbose=False, log_path=None,
Creates a new instance of the EdgeDriver service.
EdgeDriver provides an interface for Microsoft WebDriver to use
with Microsoft Edge.
:Args:
- executable_path : Path to the Microsoft WebDriver binary.
- port : Run the remote service on a specified port. Defaults to 0, which binds to a random open port
Expand Down
1 change: 1 addition & 0 deletions py/selenium/webdriver/edge/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def __init__(self, executable_path='MicrosoftWebDriver.exe',
"""
Creates a new instance of the edge driver.
Starts the service and then creates new instance of edge driver.
:Args:
- executable_path - Deprecated: path to the executable. If the default is used it assumes the executable is in the $PATH
- capabilities - Dictionary object with non-browser specific capabilities only, such as "proxy" or "loggingPref".
Expand Down

0 comments on commit 3b25b65

Please sign in to comment.