Appium-Python-Client 6.0.4__py3-none-any.whl → 6.0.6__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/webdriver.py +22 -3
- {appium_python_client-6.0.4.dist-info → appium_python_client-6.0.6.dist-info}/METADATA +1 -1
- {appium_python_client-6.0.4.dist-info → appium_python_client-6.0.6.dist-info}/RECORD +5 -5
- {appium_python_client-6.0.4.dist-info → appium_python_client-6.0.6.dist-info}/WHEEL +0 -0
- {appium_python_client-6.0.4.dist-info → appium_python_client-6.0.6.dist-info}/licenses/LICENSE +0 -0
appium/webdriver/webdriver.py
CHANGED
|
@@ -64,6 +64,9 @@ from .mobilecommand import MobileCommand as Command
|
|
|
64
64
|
from .switch_to import MobileSwitchTo
|
|
65
65
|
from .webelement import WebElement as MobileWebElement
|
|
66
66
|
|
|
67
|
+
if TYPE_CHECKING:
|
|
68
|
+
from selenium.webdriver.common.by import By
|
|
69
|
+
|
|
67
70
|
|
|
68
71
|
class ExtensionBase:
|
|
69
72
|
"""
|
|
@@ -245,6 +248,12 @@ class WebDriver(
|
|
|
245
248
|
options: AppiumOptions | list[AppiumOptions] | None = None,
|
|
246
249
|
client_config: AppiumClientConfig | None = None,
|
|
247
250
|
):
|
|
251
|
+
if isinstance(options, list):
|
|
252
|
+
# Normalize before Selenium separates common and alternative capabilities.
|
|
253
|
+
options = [
|
|
254
|
+
AppiumOptions().load_capabilities(AppiumOptions.as_w3c(option.to_capabilities())['capabilities']['alwaysMatch'])
|
|
255
|
+
for option in options
|
|
256
|
+
]
|
|
248
257
|
command_executor, client_config = _get_remote_connection_and_client_config(
|
|
249
258
|
command_executor=command_executor, client_config=client_config
|
|
250
259
|
)
|
|
@@ -282,10 +291,10 @@ class WebDriver(
|
|
|
282
291
|
|
|
283
292
|
if TYPE_CHECKING:
|
|
284
293
|
|
|
285
|
-
def find_element(self, by: str, value: str | dict | None = None) -> 'MobileWebElement': # type: ignore[override]
|
|
294
|
+
def find_element(self, by: str = By.ID, value: str | dict | None = None) -> 'MobileWebElement': # type: ignore[override]
|
|
286
295
|
...
|
|
287
296
|
|
|
288
|
-
def find_elements(self, by: str, value: str | dict | None = None) -> list['MobileWebElement']: # type: ignore[override]
|
|
297
|
+
def find_elements(self, by: str = By.ID, value: str | dict | None = None) -> list['MobileWebElement']: # type: ignore[override]
|
|
289
298
|
...
|
|
290
299
|
|
|
291
300
|
def delete_extensions(self) -> None:
|
|
@@ -349,7 +358,17 @@ class WebDriver(
|
|
|
349
358
|
if not isinstance(capabilities, (dict, AppiumOptions)):
|
|
350
359
|
raise InvalidArgumentException('Capabilities must be a dictionary or AppiumOptions instance')
|
|
351
360
|
|
|
352
|
-
|
|
361
|
+
if isinstance(capabilities, AppiumOptions):
|
|
362
|
+
w3c_caps = capabilities.to_w3c()
|
|
363
|
+
elif (
|
|
364
|
+
set(capabilities) == {'capabilities'}
|
|
365
|
+
and isinstance(capabilities['capabilities'], dict)
|
|
366
|
+
and {'alwaysMatch', 'firstMatch'}.issubset(capabilities['capabilities'])
|
|
367
|
+
):
|
|
368
|
+
# Selenium already creates the W3C envelope when given a list of options.
|
|
369
|
+
w3c_caps = copy.deepcopy(capabilities)
|
|
370
|
+
else:
|
|
371
|
+
w3c_caps = AppiumOptions.as_w3c(capabilities)
|
|
353
372
|
response = self.execute(RemoteCommand.NEW_SESSION, w3c_caps)
|
|
354
373
|
# https://w3c.github.io/webdriver/#new-session
|
|
355
374
|
if not isinstance(response, dict):
|
|
@@ -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=qu8WOrlOd0lrU_VwdkDZgUWaz5lmcLCKdOsEl85yp0U,19366
|
|
286
286
|
appium/webdriver/webelement.py,sha256=U3B2clH3lXHN_cPahNEAIsIaFWJwvrizWYTpQjnSay4,4417
|
|
287
287
|
appium/webdriver/common/__init__.py,sha256=4MapoJ3p5LiP0AsHMgL2xoPTIFno4dcH1GSoxaZzv4w,623
|
|
288
288
|
appium/webdriver/common/appiumby.py,sha256=1sFzgJht8v9pO0fG-uK1jgbb8zMJwfBy3LJH15OPqq8,1785
|
|
@@ -319,7 +319,7 @@ appium/webdriver/extensions/flutter_integration/__init__.py,sha256=wSUl6yC2TJNla
|
|
|
319
319
|
appium/webdriver/extensions/flutter_integration/flutter_commands.py,sha256=FwNqIykRyMAU8-344GTlceBOxLbS-bA9bfGX4iJpHxw,11985
|
|
320
320
|
appium/webdriver/extensions/flutter_integration/flutter_finder.py,sha256=HH9vGAouJuHzp29Jam_lQGrh67PDq6MxU5Ifewf7C5w,2164
|
|
321
321
|
appium/webdriver/extensions/flutter_integration/scroll_directions.py,sha256=CkOv7k21SMe-h2-EYSZ6MBKBGTRC1csQ-tuowHgMn0E,85
|
|
322
|
-
appium_python_client-6.0.
|
|
323
|
-
appium_python_client-6.0.
|
|
324
|
-
appium_python_client-6.0.
|
|
325
|
-
appium_python_client-6.0.
|
|
322
|
+
appium_python_client-6.0.6.dist-info/METADATA,sha256=b7C6Y0I6b__Kv1ASU2g_qrsSdtpdobarLhOAMpVQ2fE,21194
|
|
323
|
+
appium_python_client-6.0.6.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
324
|
+
appium_python_client-6.0.6.dist-info/licenses/LICENSE,sha256=QxeKfXNmPWCfFyrXiwdVzMFPFMK0nlBrKhYLUoIcqhk,11384
|
|
325
|
+
appium_python_client-6.0.6.dist-info/RECORD,,
|
|
File without changes
|
{appium_python_client-6.0.4.dist-info → appium_python_client-6.0.6.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|