Skip to content

Commit 4bc8677

Browse files
authored
doc: Add script to generate sphinx doc (#508)
* Add quickstart template files * Update conf file * Update * Update settings * Change project name * Add script to generate docs * Changed header title * Add new line to usage section * Add py.typed file(PEP561) * Replace \n with new line * tweak * Use sphinx format for tables
1 parent 58bec44 commit 4bc8677

21 files changed

+659
-15
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*._*
66
*.log
77
*.log.*
8+
_*/
89

910
*.pyc
1011
*.egg-info
@@ -23,4 +24,4 @@ __pycache__
2324
venv*
2425
.tox
2526

26-
Pipfile.lock
27+
Pipfile.lock

appium/webdriver/common/multi_action.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ def add(self, *touch_actions: 'TouchAction') -> None:
4545
4646
Usage:
4747
a1 = TouchAction(driver)
48+
4849
a1.press(el1).move_to(el2).release()
50+
4951
a2 = TouchAction(driver)
52+
5053
a2.press(el2).move_to(el1).release()
5154
5255
MultiAction(driver).add(a1, a2)
@@ -62,8 +65,11 @@ def perform(self: T) -> T:
6265
6366
Usage:
6467
a1 = TouchAction(driver)
68+
6569
a1.press(el1).move_to(el2).release()
70+
6671
a2 = TouchAction(driver)
72+
6773
a2.press(el2).move_to(el1).release()
6874
6975
MultiAction(driver).add(a1, a2).perform()

appium/webdriver/connectiontype.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,21 @@
1616
"""
1717
Connection types are specified here:
1818
https://code.google.com/p/selenium/source/browse/spec-draft.md?repo=mobile#120
19-
Value (Alias) | Data | Wifi | Airplane Mode
20-
-------------------------------------------------
21-
0 (None) | 0 | 0 | 0
22-
1 (Airplane Mode) | 0 | 0 | 1
23-
2 (Wifi only) | 0 | 1 | 0
24-
4 (Data only) | 1 | 0 | 0
25-
6 (All network on) | 1 | 1 | 0
19+
20+
+--------------------+------+------+---------------+
21+
| Value (Alias) | Data | Wifi | Airplane Mode |
22+
+====================+======+======+===============+
23+
| 0 (None) | 0 | 0 | 0 |
24+
+--------------------+------+------+---------------+
25+
| 1 (Airplane Mode) | 0 | 0 | 1 |
26+
+--------------------+------+------+---------------+
27+
| 2 (Wifi only) | 0 | 1 | 0 |
28+
+--------------------+------+------+---------------+
29+
| 4 (Data only) | 1 | 0 | 0 |
30+
+--------------------+------+------+---------------+
31+
| 6 (All network on) | 1 | 1 | 0 |
32+
+--------------------+------+------+---------------+
33+
2634
"""
2735

2836

appium/webdriver/extensions/android/network.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,21 @@ def set_network_connection(self, connection_type: int) -> int:
5050
"""Sets the network connection type. Android only.
5151
5252
Possible values:
53-
Value (Alias) | Data | Wifi | Airplane Mode
54-
-------------------------------------------------
55-
0 (None) | 0 | 0 | 0
56-
1 (Airplane Mode) | 0 | 0 | 1
57-
2 (Wifi only) | 0 | 1 | 0
58-
4 (Data only) | 1 | 0 | 0
59-
6 (All network on) | 1 | 1 | 0
53+
54+
+--------------------+------+------+---------------+
55+
| Value (Alias) | Data | Wifi | Airplane Mode |
56+
+====================+======+======+===============+
57+
| 0 (None) | 0 | 0 | 0 |
58+
+--------------------+------+------+---------------+
59+
| 1 (Airplane Mode) | 0 | 0 | 1 |
60+
+--------------------+------+------+---------------+
61+
| 2 (Wifi only) | 0 | 1 | 0 |
62+
+--------------------+------+------+---------------+
63+
| 4 (Data only) | 1 | 0 | 0 |
64+
+--------------------+------+------+---------------+
65+
| 6 (All network on) | 1 | 1 | 0 |
66+
+--------------------+------+------+---------------+
67+
6068
These are available through the enumeration `appium.webdriver.ConnectionType`
6169
6270
Args:

appium/webdriver/extensions/android/power.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def set_power_ac(self, ac_state: str) -> T:
5252
5353
Usage:
5454
self.driver.set_power_ac(Power.AC_OFF)
55+
5556
self.driver.set_power_ac(Power.AC_ON)
5657
5758
Returns:

appium/webdriver/extensions/device_time.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def get_device_time(self, format: Optional[str] = None) -> str:
4141
4242
Usage:
4343
self.driver.get_device_time()
44+
4445
self.driver.get_device_time("YYYY-MM-DD")
4546
4647
Return:

appium/webdriver/extensions/execute_driver.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ def execute_driver(self, script: str, script_type: str = 'webdriverio', timeout_
3434
3535
Usage:
3636
self.driver.execute_driver(script='return [];')
37+
3738
self.driver.execute_driver(script='return [];', script_type='webdriverio')
39+
3840
self.driver.execute_driver(script='return [];', script_type='webdriverio', timeout_ms=10000)
3941
4042
Returns:

appium/webdriver/extensions/log_event.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def get_events(self, type: List[str] = None) -> Dict[str, Union[str, int]]:
3232
3333
Usage:
3434
events = driver.get_events()
35+
3536
events = driver.get_events(['appium:funEvent'])
3637
3738
Returns:

appium/webdriver/py.typed

Whitespace-only changes.

appium/webdriver/webelement.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ def location_in_view(self) -> Dict[str, int]:
180180
181181
Usage:
182182
location = element.location_in_view
183+
183184
x = location['x']
185+
184186
y = location['y']
185187
186188
Returns:

0 commit comments

Comments
 (0)