"""
驱动获取方法
"""
from appium import webdriver


def get_driver():
    """驱动对象获取方法"""
    # 获取驱动对象
    capabilities = {
        "platformName": "Android",  # 测试平台（Android、iOS）
        "platformVersion": "5.1",  # 测试系统版本
        "deviceName": "模拟器",  # 测试设备名称
        "appPackage": "com.bjcsxq.chat.carfriend",  # 待测应用的包名
        "appActivity": ".MainActivity",  # 待测应用的启动名
        # 输入中文设置
        "resetKeyboard": True,
        "unicodeKeyboard": True,
        # 获取toast信息
        "automationName": "Uiautomator2"
    }
    driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_capabilities=capabilities)
    return driver

#试试
if __name__ == '__main__':
    get_driver()

# 这道题太难了 俺不会做

2c18cd631dd146f3e574910fe37fe3098839ee40
<mask token>

<mask token>


def get_driver():
    """驱动对象获取方法"""
    capabilities = {'platformName': 'Android', 'platformVersion': '5.1',
        'deviceName': '模拟器', 'appPackage': 'com.bjcsxq.chat.carfriend',
        'appActivity': '.MainActivity', 'resetKeyboard': True,
        'unicodeKeyboard': True, 'automationName': 'Uiautomator2'}
    driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub',
        desired_capabilities=capabilities)
    return driver


<mask token>

<mask token>


def get_driver():
    """驱动对象获取方法"""
    capabilities = {'platformName': 'Android', 'platformVersion': '5.1',
        'deviceName': '模拟器', 'appPackage': 'com.bjcsxq.chat.carfriend',
        'appActivity': '.MainActivity', 'resetKeyboard': True,
        'unicodeKeyboard': True, 'automationName': 'Uiautomator2'}
    driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub',
        desired_capabilities=capabilities)
    return driver


if __name__ == '__main__':
    get_driver()

<mask token>
from appium import webdriver


def get_driver():
    """驱动对象获取方法"""
    capabilities = {'platformName': 'Android', 'platformVersion': '5.1',
        'deviceName': '模拟器', 'appPackage': 'com.bjcsxq.chat.carfriend',
        'appActivity': '.MainActivity', 'resetKeyboard': True,
        'unicodeKeyboard': True, 'automationName': 'Uiautomator2'}
    driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub',
        desired_capabilities=capabilities)
    return driver


if __name__ == '__main__':
    get_driver()

"""
驱动获取方法
"""
from appium import webdriver


def get_driver():
    """驱动对象获取方法"""
    # 获取驱动对象
    capabilities = {
        "platformName": "Android",  # 测试平台（Android、iOS）
        "platformVersion": "5.1",  # 测试系统版本
        "deviceName": "模拟器",  # 测试设备名称
        "appPackage": "com.bjcsxq.chat.carfriend",  # 待测应用的包名
        "appActivity": ".MainActivity",  # 待测应用的启动名
        # 输入中文设置
        "resetKeyboard": True,
        "unicodeKeyboard": True,
        # 获取toast信息
        "automationName": "Uiautomator2"
    }
    driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_capabilities=capabilities)
    return driver

#试试
if __name__ == '__main__':
    get_driver()

# 这道题太难了 俺不会做
