Appium-Python-Client 6.0.5__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.
@@ -248,6 +248,12 @@ class WebDriver(
248
248
  options: AppiumOptions | list[AppiumOptions] | None = None,
249
249
  client_config: AppiumClientConfig | None = None,
250
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
+ ]
251
257
  command_executor, client_config = _get_remote_connection_and_client_config(
252
258
  command_executor=command_executor, client_config=client_config
253
259
  )
@@ -352,7 +358,17 @@ class WebDriver(
352
358
  if not isinstance(capabilities, (dict, AppiumOptions)):
353
359
  raise InvalidArgumentException('Capabilities must be a dictionary or AppiumOptions instance')
354
360
 
355
- w3c_caps = AppiumOptions.as_w3c(capabilities) if isinstance(capabilities, dict) else capabilities.to_w3c()
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)
356
372
  response = self.execute(RemoteCommand.NEW_SESSION, w3c_caps)
357
373
  # https://w3c.github.io/webdriver/#new-session
358
374
  if not isinstance(response, dict):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: Appium-Python-Client
3
- Version: 6.0.5
3
+ Version: 6.0.6
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
@@ -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=RzBoHK5Yp0pPCYTmmY1HOfnTuhdWSubOI9fgWk_9680,18621
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.5.dist-info/METADATA,sha256=xvkoIMy_LiReV0DXPw861IN5BbUcz2sSJeD9b940T5g,21194
323
- appium_python_client-6.0.5.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
324
- appium_python_client-6.0.5.dist-info/licenses/LICENSE,sha256=QxeKfXNmPWCfFyrXiwdVzMFPFMK0nlBrKhYLUoIcqhk,11384
325
- appium_python_client-6.0.5.dist-info/RECORD,,
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,,