SeldomQA / seldom

Seldom automation testing framework based on unittest
https://seldomqa.github.io/
Apache License 2.0
803 stars 328 forks source link

AttributeError: 'dict' object has no attribute 'to_capabilities' #218

Closed netassa closed 7 months ago

netassa commented 7 months ago

image 1711987983906 咨询一下,这个报错是什么原因?需要怎么处理?

defnngj commented 7 months ago

@netassa appium 2.0 配置有所不同,参考:

#confrun.py
from appium.options.android import UiAutomator2Options

def app_info():
    """
    app配置
    """
    capabilities = {
        "automationName": "UiAutomator2",
        "platformName": "Android",
        "appPackage": "com.meizu.flyme.flymebbs",
        "appActivity": "com.meizu.myplus.ui.splash.SplashActivity",
        "noReset": True,
    }
    options = UiAutomator2Options().load_capabilities(capabilities)
    return options
netassa commented 7 months ago

谢谢。