From 0dce277a4bf5b498b7bccf129dcf53a5aa4faad6 Mon Sep 17 00:00:00 2001 From: AutomatedTester Date: Tue, 27 May 2014 23:56:51 +0100 Subject: [PATCH] Forgot to add the new files for python docs --- .../selenium/webdriver/android/webdriver.html | 131 +++++++++++++++ .../selenium/webdriver/remote/mobile.html | 145 +++++++++++++++++ .../selenium.webdriver.android.webdriver.txt | 4 + .../selenium.webdriver.remote.mobile.txt | 4 + .../selenium.webdriver.android.webdriver.html | 117 +++++++++++++ .../selenium.webdriver.remote.mobile.html | 154 ++++++++++++++++++ 6 files changed, 555 insertions(+) create mode 100644 docs/api/py/_modules/selenium/webdriver/android/webdriver.html create mode 100644 docs/api/py/_modules/selenium/webdriver/remote/mobile.html create mode 100644 docs/api/py/_sources/webdriver_android/selenium.webdriver.android.webdriver.txt create mode 100644 docs/api/py/_sources/webdriver_remote/selenium.webdriver.remote.mobile.txt create mode 100644 docs/api/py/webdriver_android/selenium.webdriver.android.webdriver.html create mode 100644 docs/api/py/webdriver_remote/selenium.webdriver.remote.mobile.html diff --git a/docs/api/py/_modules/selenium/webdriver/android/webdriver.html b/docs/api/py/_modules/selenium/webdriver/android/webdriver.html new file mode 100644 index 0000000000000..7bc426218040e --- /dev/null +++ b/docs/api/py/_modules/selenium/webdriver/android/webdriver.html @@ -0,0 +1,131 @@ + + + + + + + + selenium.webdriver.android.webdriver — Selenium 2.0 documentation + + + + + + + + + + + + + + +
+
+
+
+ +

Source code for selenium.webdriver.android.webdriver

+#!/usr/bin/python
+#
+# Copyright 2014 Software freedom conservancy
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import base64
+from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
+from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
+
+
[docs]class WebDriver(RemoteWebDriver): + """ + Simple RemoteWebDriver wrapper to start connect to Selendroid's WebView app + + For more info on getting started with Selendroid + http://selendroid.io/mobileWeb.html + """ + + def __init__(self, host="localhost", port=4444, desired_capabilities=DesiredCapabilities.ANDROID): + """ + Creates a new instance of Selendroid using the WebView app + + :Args: + - host - location of where selendroid is running + - port - port that selendroid is running on + - desired_capabilities: Dictionary object with capabilities + """ + RemoteWebDriver.__init__(self, + command_executor="http://%s:%d/wd/hub" % (host, port), + desired_capabilities=desired_capabilities) +
+ +
+
+
+
+
+ + +
+
+
+ + + + + \ No newline at end of file diff --git a/docs/api/py/_modules/selenium/webdriver/remote/mobile.html b/docs/api/py/_modules/selenium/webdriver/remote/mobile.html new file mode 100644 index 0000000000000..3bc8f9b3535f1 --- /dev/null +++ b/docs/api/py/_modules/selenium/webdriver/remote/mobile.html @@ -0,0 +1,145 @@ + + + + + + + + selenium.webdriver.remote.mobile — Selenium 2.0 documentation + + + + + + + + + + + + + + +
+
+
+
+ +

Source code for selenium.webdriver.remote.mobile

+# Copyright 2014 Software freedom conservancy
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from .command import Command
+from selenium.common.exceptions import WebDriverException
+
+
[docs]class Mobile(object): + +
[docs] class ConnectionType(object): + def __init__(self, mask): + self.mask = mask + @property +
[docs] def airplane_mode(self): + return self.mask % 2 == 1
+ @property +
[docs] def wifi(self): + return (self.mask / 2) % 2 == 1
+ @property +
[docs] def data(self): + return (self.mask / 4) > 0 +
+ ALL_NETWORK = ConnectionType(6) + WIFI_NETWORK = ConnectionType(2) + DATA_NETWORK = ConnectionType(4) + AIRPLANE_MODE = ConnectionType(1) + + def __init__(self, driver): + self._driver = driver + + @property +
[docs] def network_connection(self): + return self.ConnectionType(self._driver.execute(Command.GET_NETWORK_CONNECTION)['value']) +
+
[docs] def set_network_connection(self, network): + """ + Set the network connection for the remote device. + Example of setting airplane mode: + driver.mobile.set_network_connection(driver.mobile.AIRPLANE_MODE) + """ + mode = network.mask if isinstance(network, self.ConnectionType) else network + return self.ConnectionType(self._driver.execute(Command.SET_NETWORK_CONNECTION, + {'name':'network_connection', + 'parameters':{'type': mode}})['value'])
+
+ +
+
+
+
+
+ + +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/api/py/_sources/webdriver_android/selenium.webdriver.android.webdriver.txt b/docs/api/py/_sources/webdriver_android/selenium.webdriver.android.webdriver.txt new file mode 100644 index 0000000000000..a7693d9dcf636 --- /dev/null +++ b/docs/api/py/_sources/webdriver_android/selenium.webdriver.android.webdriver.txt @@ -0,0 +1,4 @@ +selenium.webdriver.android.webdriver +==================================== + +.. automodule:: selenium.webdriver.android.webdriver diff --git a/docs/api/py/_sources/webdriver_remote/selenium.webdriver.remote.mobile.txt b/docs/api/py/_sources/webdriver_remote/selenium.webdriver.remote.mobile.txt new file mode 100644 index 0000000000000..dc6ab4ab7515e --- /dev/null +++ b/docs/api/py/_sources/webdriver_remote/selenium.webdriver.remote.mobile.txt @@ -0,0 +1,4 @@ +selenium.webdriver.remote.mobile +================================ + +.. automodule:: selenium.webdriver.remote.mobile diff --git a/docs/api/py/webdriver_android/selenium.webdriver.android.webdriver.html b/docs/api/py/webdriver_android/selenium.webdriver.android.webdriver.html new file mode 100644 index 0000000000000..3a727b1c975df --- /dev/null +++ b/docs/api/py/webdriver_android/selenium.webdriver.android.webdriver.html @@ -0,0 +1,117 @@ + + + + + + + + selenium.webdriver.android.webdriver — Selenium 2.0 documentation + + + + + + + + + + + + + +
+
+
+
+ +
+

selenium.webdriver.android.webdriver

+
+
+class selenium.webdriver.android.webdriver.WebDriver(host='localhost', port=4444, desired_capabilities={'platform': 'ANDROID', 'browserName': 'android', 'version': '', 'javascriptEnabled': True})[source]
+

Simple RemoteWebDriver wrapper to start connect to Selendroid’s WebView app

+

For more info on getting started with Selendroid +http://selendroid.io/mobileWeb.html

+

Creates a new instance of Selendroid using the WebView app

+ +++ + + + +
Args :
    +
  • host - location of where selendroid is running
  • +
  • port - port that selendroid is running on
  • +
  • desired_capabilities: Dictionary object with capabilities
  • +
+
+
+ +
+ + +
+
+
+
+
+

This Page

+ + + +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/api/py/webdriver_remote/selenium.webdriver.remote.mobile.html b/docs/api/py/webdriver_remote/selenium.webdriver.remote.mobile.html new file mode 100644 index 0000000000000..b9c4aaa233c0b --- /dev/null +++ b/docs/api/py/webdriver_remote/selenium.webdriver.remote.mobile.html @@ -0,0 +1,154 @@ + + + + + + + + selenium.webdriver.remote.mobile — Selenium 2.0 documentation + + + + + + + + + + + + + +
+
+
+
+ +
+

selenium.webdriver.remote.mobile

+
+
+class selenium.webdriver.remote.mobile.Mobile(driver)[source]
+
+
+AIRPLANE_MODE = <selenium.webdriver.remote.mobile.ConnectionType object at 0x10f5940d0>
+
+ +
+
+ALL_NETWORK = <selenium.webdriver.remote.mobile.ConnectionType object at 0x10f58bfd0>
+
+ +
+
+class ConnectionType(mask)[source]
+
+
+airplane_mode[source]
+
+ +
+
+data[source]
+
+ +
+
+wifi[source]
+
+ +
+ +
+
+Mobile.DATA_NETWORK = <selenium.webdriver.remote.mobile.ConnectionType object at 0x10f594090>
+
+ +
+
+Mobile.WIFI_NETWORK = <selenium.webdriver.remote.mobile.ConnectionType object at 0x10f594050>
+
+ +
+
+Mobile.network_connection[source]
+
+ +
+
+Mobile.set_network_connection(network)[source]
+

Set the network connection for the remote device. +Example of setting airplane mode:

+
+
driver.mobile.set_network_connection(driver.mobile.AIRPLANE_MODE)
+
+ +
+ +
+ + +
+
+
+
+
+

This Page

+ + + +
+
+
+
+ + + + \ No newline at end of file