'DeprecationWarning: desired_capabilities has been deprecated, please pass in an Options object with options kwarg super().__init__(
import pytest
from appium import webdriver
class Test:
def setup_class(self):
print("setup from here")
desired_caps = dict()
desired_caps['platformName'] = 'ios'
desired_caps['platformVersion'] = '12.1'
desired_caps['deviceName'] = 'iPhone 8'
desired_caps['app'] = 'com.masilotti.UI-Testing-Cheat-Sheet'
self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
PycharmProjects/DemoTest/venv/lib/python3.8/site-packages/appium/webdriver/webdriver.py:274: DeprecationWarning: desired_capabilities has been deprecated, please pass in an Options object with options kwarg super().init(
How to get rid of this warning, this warning appears whenever Unitest or Pytest are used.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|