Appium-Python-Client 6.1.2__py3-none-any.whl → 6.1.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- appium/webdriver/extensions/flutter_integration/flutter_commands.py +8 -4
- appium/webdriver/extensions/flutter_integration/scroll_directions.py +2 -0
- appium/webdriver/webdriver.py +9 -9
- {appium_python_client-6.1.2.dist-info → appium_python_client-6.1.4.dist-info}/METADATA +12 -7
- {appium_python_client-6.1.2.dist-info → appium_python_client-6.1.4.dist-info}/RECORD +7 -7
- {appium_python_client-6.1.2.dist-info → appium_python_client-6.1.4.dist-info}/WHEEL +0 -0
- {appium_python_client-6.1.2.dist-info → appium_python_client-6.1.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -38,7 +38,8 @@ class FlutterCommand:
|
|
|
38
38
|
|
|
39
39
|
Args:
|
|
40
40
|
locator (Union[WebElement, FlutterFinder]): The element to wait for; can be a WebElement or a FlutterFinder.
|
|
41
|
-
timeout (Optional[float]): Maximum wait time in seconds.
|
|
41
|
+
timeout (Optional[float]): Maximum wait time in whole seconds. The Flutter server drops any fractional
|
|
42
|
+
part, so 0.5 becomes 0. Defaults to a predefined timeout if not specified.
|
|
42
43
|
|
|
43
44
|
Returns:
|
|
44
45
|
None
|
|
@@ -59,7 +60,8 @@ class FlutterCommand:
|
|
|
59
60
|
|
|
60
61
|
Args:
|
|
61
62
|
locator (Union[WebElement, FlutterFinder]): The element to wait for; can be a WebElement or a FlutterFinder.
|
|
62
|
-
timeout (Optional[float]): Maximum wait time in seconds.
|
|
63
|
+
timeout (Optional[float]): Maximum wait time in whole seconds. The Flutter server drops any fractional
|
|
64
|
+
part, so 0.5 becomes 0. Defaults to a predefined timeout if not specified.
|
|
63
65
|
|
|
64
66
|
Returns:
|
|
65
67
|
None:
|
|
@@ -128,10 +130,10 @@ class FlutterCommand:
|
|
|
128
130
|
|
|
129
131
|
Args:
|
|
130
132
|
scroll_to (FlutterFinder): The Flutter element to scroll to.
|
|
131
|
-
scroll_direction (ScrollDirection): The direction to scroll
|
|
133
|
+
scroll_direction (ScrollDirection): The direction to scroll. Defaults to `ScrollDirection.DOWN`.
|
|
132
134
|
|
|
133
135
|
KeywordArgs:
|
|
134
|
-
scrollView (
|
|
136
|
+
scrollView (FlutterFinder | dict): Finder of the scrollable view. Defaults to the first `Scrollable` widget
|
|
135
137
|
delta (int): delta for the scroll. Default value is 64
|
|
136
138
|
maxScrolls (int): Max times to scroll. Default value is 15
|
|
137
139
|
settleBetweenScrollsTimeout (float): settle timeout in milliseconds. Default value is 5000
|
|
@@ -142,6 +144,8 @@ class FlutterCommand:
|
|
|
142
144
|
"""
|
|
143
145
|
opts['finder'] = scroll_to.to_dict()
|
|
144
146
|
opts['scrollDirection'] = scroll_direction.value
|
|
147
|
+
if isinstance(opts.get('scrollView'), FlutterFinder):
|
|
148
|
+
opts['scrollView'] = opts['scrollView'].to_dict()
|
|
145
149
|
return self.execute_flutter_command('scrollTillVisible', opts)
|
|
146
150
|
|
|
147
151
|
def inject_mock_image(self, value: str) -> str:
|
appium/webdriver/webdriver.py
CHANGED
|
@@ -74,7 +74,7 @@ class ExtensionBase:
|
|
|
74
74
|
|
|
75
75
|
Example:
|
|
76
76
|
When you want to add `example_command` which calls a get request to
|
|
77
|
-
|
|
77
|
+
`/session/$sessionId/path/to/your/custom/url`.
|
|
78
78
|
|
|
79
79
|
#. Defines an extension as a subclass of `ExtensionBase`
|
|
80
80
|
.. code-block:: python
|
|
@@ -91,7 +91,7 @@ class ExtensionBase:
|
|
|
91
91
|
|
|
92
92
|
# Used to register the command pair as "Appium command" in this driver.
|
|
93
93
|
def add_command(self):
|
|
94
|
-
return ('GET', 'session/$sessionId/path/to/your/custom/url')
|
|
94
|
+
return ('GET', '/session/$sessionId/path/to/your/custom/url')
|
|
95
95
|
|
|
96
96
|
#. Creates a session with the extension.
|
|
97
97
|
.. code-block:: python
|
|
@@ -105,7 +105,7 @@ class ExtensionBase:
|
|
|
105
105
|
.. code-block:: python
|
|
106
106
|
|
|
107
107
|
# Then, the driver calls a get request against
|
|
108
|
-
#
|
|
108
|
+
# `/session/$sessionId/path/to/your/custom/url`. `$sessionId` will be
|
|
109
109
|
# replaced properly in the driver. Then, the method returns
|
|
110
110
|
# the `value` part of the response.
|
|
111
111
|
driver.custom_method_name()
|
|
@@ -127,16 +127,16 @@ class ExtensionBase:
|
|
|
127
127
|
def method_name(self):
|
|
128
128
|
return 'custom_method_name'
|
|
129
129
|
|
|
130
|
-
def
|
|
130
|
+
def custom_method_name(self, argument):
|
|
131
131
|
return self.execute(argument)['value']
|
|
132
132
|
|
|
133
133
|
def add_command(self):
|
|
134
|
-
return ('post', 'session/$sessionId/path/to/your/custom/url')
|
|
134
|
+
return ('post', '/session/$sessionId/path/to/your/custom/url')
|
|
135
135
|
|
|
136
136
|
driver = webdriver.Remote('http://localhost:4723/wd/hub', options=options,
|
|
137
137
|
extensions=[YourCustomCommand])
|
|
138
138
|
|
|
139
|
-
# Then, the driver sends a post request to
|
|
139
|
+
# Then, the driver sends a post request to `/session/$sessionId/path/to/your/custom/url`
|
|
140
140
|
# with `{'dummy_arg': 'as a value'}` JSON body.
|
|
141
141
|
driver.custom_method_name({'dummy_arg': 'as a value'})
|
|
142
142
|
|
|
@@ -153,13 +153,13 @@ class ExtensionBase:
|
|
|
153
153
|
return self.execute({'id': element_id})['value']
|
|
154
154
|
|
|
155
155
|
def add_command(self):
|
|
156
|
-
return ('GET', 'session/$sessionId/path/to/your/custom/$id/url')
|
|
156
|
+
return ('GET', '/session/$sessionId/path/to/your/custom/$id/url')
|
|
157
157
|
|
|
158
158
|
driver = webdriver.Remote('http://localhost:4723/wd/hub', options=options,
|
|
159
|
-
extensions=[
|
|
159
|
+
extensions=[CustomURLCommand])
|
|
160
160
|
element = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='id')
|
|
161
161
|
|
|
162
|
-
# Then, the driver calls a get request to
|
|
162
|
+
# Then, the driver calls a get request to `/session/$sessionId/path/to/your/custom/$id/url`
|
|
163
163
|
# with replacing the `$id` with the given `element.id`
|
|
164
164
|
driver.custom_method_name(element.id)
|
|
165
165
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: Appium-Python-Client
|
|
3
|
-
Version: 6.1.
|
|
3
|
+
Version: 6.1.4
|
|
4
4
|
Summary: Python client for Appium
|
|
5
5
|
Project-URL: Homepage, https://appium.io/
|
|
6
6
|
Project-URL: Repository, https://github.com/appium/python-client
|
|
@@ -232,7 +232,7 @@ def appium_service():
|
|
|
232
232
|
|
|
233
233
|
def create_ios_driver(custom_opts=None):
|
|
234
234
|
options = XCUITestOptions()
|
|
235
|
-
options.
|
|
235
|
+
options.platform_version = '13.4'
|
|
236
236
|
options.udid = '123456789ABC'
|
|
237
237
|
if custom_opts is not None:
|
|
238
238
|
options.load_capabilities(custom_opts)
|
|
@@ -242,7 +242,7 @@ def create_ios_driver(custom_opts=None):
|
|
|
242
242
|
|
|
243
243
|
def create_android_driver(custom_opts=None):
|
|
244
244
|
options = UiAutomator2Options()
|
|
245
|
-
options.
|
|
245
|
+
options.platform_version = '10'
|
|
246
246
|
options.udid = '123456789ABC'
|
|
247
247
|
if custom_opts is not None:
|
|
248
248
|
options.load_capabilities(custom_opts)
|
|
@@ -408,15 +408,20 @@ from appium.options.ios import XCUITestOptions
|
|
|
408
408
|
|
|
409
409
|
import urllib3
|
|
410
410
|
from appium.webdriver.appium_connection import AppiumConnection
|
|
411
|
+
from appium.webdriver.client_config import AppiumClientConfig
|
|
411
412
|
|
|
412
413
|
# Retry connection error up to 3 times.
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
414
|
+
# Selenium passes the arguments under the nested 'init_args_for_pool_manager' key to urllib3.PoolManager.
|
|
415
|
+
init_args_for_pool_manager = {
|
|
416
|
+
'init_args_for_pool_manager': {'retries': urllib3.util.retry.Retry(total=3, connect=3, read=False)}
|
|
417
|
+
}
|
|
418
|
+
client_config = AppiumClientConfig(
|
|
419
|
+
remote_server_addr='http://127.0.0.1:4723', init_args_for_pool_manager=init_args_for_pool_manager
|
|
416
420
|
)
|
|
421
|
+
appium_executor = AppiumConnection(client_config=client_config)
|
|
417
422
|
|
|
418
423
|
options = XCUITestOptions()
|
|
419
|
-
options.
|
|
424
|
+
options.platform_version = '13.4'
|
|
420
425
|
options.udid = '123456789ABC'
|
|
421
426
|
options.app = '/full/path/to/app/UICatalog.app.zip'
|
|
422
427
|
driver = webdriver.Remote(appium_executor, options=options)
|
|
@@ -282,7 +282,7 @@ appium/webdriver/errorhandler.py,sha256=_aT6Qo64ARGch7evG2Uku4-l8wkDaM1R2o06PWXx
|
|
|
282
282
|
appium/webdriver/locator_converter.py,sha256=uUdJsX1o0E8x-StcJvO5gFFJbcRzhOmySfgPqJ0UaU4,999
|
|
283
283
|
appium/webdriver/mobilecommand.py,sha256=B_okscraJMPrN4hSyetSNddkOZ0PyTzsQvBdYHHQqvM,3162
|
|
284
284
|
appium/webdriver/switch_to.py,sha256=kom9MHNOdZuEG0ALDuaw27NHvtsRDnl-sy_XNAd-Rl4,1174
|
|
285
|
-
appium/webdriver/webdriver.py,sha256=
|
|
285
|
+
appium/webdriver/webdriver.py,sha256=6i3KPWyBOKeshv58VB9N0vDFTgDmU6z9oEpup3cSyjo,19328
|
|
286
286
|
appium/webdriver/webelement.py,sha256=ewBkxaZiJtmhRoKjQk317WjewansQ6tpm3JePSv1pQ4,4500
|
|
287
287
|
appium/webdriver/common/__init__.py,sha256=4MapoJ3p5LiP0AsHMgL2xoPTIFno4dcH1GSoxaZzv4w,623
|
|
288
288
|
appium/webdriver/common/appiumby.py,sha256=1sFzgJht8v9pO0fG-uK1jgbb8zMJwfBy3LJH15OPqq8,1785
|
|
@@ -316,10 +316,10 @@ appium/webdriver/extensions/android/power.py,sha256=BD-fwZNY9aFeAZCRKa79OdOXI0ml
|
|
|
316
316
|
appium/webdriver/extensions/android/sms.py,sha256=ZXvZ0DpA_X5iojNDlh91O8tYJUmNb28S_VlnSpijwPw,1488
|
|
317
317
|
appium/webdriver/extensions/android/system_bars.py,sha256=1vCIwg5UGpY1GfCoXFPL9nfSVjafAGVsTonBMrmIwaw,1530
|
|
318
318
|
appium/webdriver/extensions/flutter_integration/__init__.py,sha256=wSUl6yC2TJNla7xbHXkCfn9J1LpQs9UIx8oOs6V8kZA,567
|
|
319
|
-
appium/webdriver/extensions/flutter_integration/flutter_commands.py,sha256=
|
|
319
|
+
appium/webdriver/extensions/flutter_integration/flutter_commands.py,sha256=1bAczDwqr40Rrbln321cIVG83ghar7-27aerRAKbfMs,12306
|
|
320
320
|
appium/webdriver/extensions/flutter_integration/flutter_finder.py,sha256=HH9vGAouJuHzp29Jam_lQGrh67PDq6MxU5Ifewf7C5w,2164
|
|
321
|
-
appium/webdriver/extensions/flutter_integration/scroll_directions.py,sha256=
|
|
322
|
-
appium_python_client-6.1.
|
|
323
|
-
appium_python_client-6.1.
|
|
324
|
-
appium_python_client-6.1.
|
|
325
|
-
appium_python_client-6.1.
|
|
321
|
+
appium/webdriver/extensions/flutter_integration/scroll_directions.py,sha256=y1BCEbWHJ86ivj5quhln10uwV9fWsA6nsdQ18j1Ua3E,123
|
|
322
|
+
appium_python_client-6.1.4.dist-info/METADATA,sha256=PQUU3xirFx0Sll61PqYlPdj8LiByORgDMAKP5Y2pjj4,22042
|
|
323
|
+
appium_python_client-6.1.4.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
324
|
+
appium_python_client-6.1.4.dist-info/licenses/LICENSE,sha256=QxeKfXNmPWCfFyrXiwdVzMFPFMK0nlBrKhYLUoIcqhk,11384
|
|
325
|
+
appium_python_client-6.1.4.dist-info/RECORD,,
|
|
File without changes
|
{appium_python_client-6.1.2.dist-info → appium_python_client-6.1.4.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|