def test_main():
    # 通过webdriver包下面的Remote方法打开App
    ConnectAppium.DisConnectAppium()
    ConnectAppium.driver.start_session(ConnectAppium.desired_caps, None)
    print("断开重新建立APPIUM连接成功")
    ConnectAppiumAndAction()
    assert CheckOTAPushToast() == True, '判断系统更新应用推送通知后,通知栏是否有消息提醒'
def test_main():
    # 通过webdriver包下面的Remote方法打开App
    ConnectAppium.DisConnectAppium()
    ConnectAppium.driver.start_session(ConnectAppium.desired_caps, None)
    print("断开重新建立APPIUM连接成功")
    ConnectAppiumAndAction()
    assert CheckOngoingDownloadBtn() == True, '判断当前界面暂停后点击继续下载是否能够继续下载'
示例#3
0
def test_main():
    # 通过webdriver包下面的Remote方法打开App
    ConnectAppium.DisConnectAppium()
    ConnectAppium.driver.start_session(ConnectAppium.desired_caps, None)
    print("断开重新建立APPIUM连接成功")
    ConnectAppiumAndAction()
    assert CheckChangeWIFIDownloadSpeedSaved('40KB/s') == True, '判断当前界面是否在系统更新界面'
示例#4
0
def test_main():
    # 通过webdriver包下面的Remote方法打开App
    ConnectAppium.DisConnectAppium()
    ConnectAppium.driver.start_session(ConnectAppium.desired_caps, None)
    print("断开重新建立APPIUM连接成功")
    ConnectAppiumAndAction()
    assert CheckAutoWIFIDownloadBtn() == True, '判断wifi自动下载过程当前界面是否在系统更新界面'
def test_main():
    # 通过webdriver包下面的Remote方法打开App
    ConnectAppium.DisConnectAppium()
    ConnectAppium.driver.start_session(ConnectAppium.desired_caps, None)
    print("断开重新建立APPIUM连接成功")
    ConnectAppiumAndAction()
    assert CheckClosedWIFIAutoDownloadBtn() == True, '判断当前界面关闭WiFi自动下载后,退出重新进入应用是否自动下载'
def test_main():
    # 通过webdriver包下面的Remote方法打开App
    ConnectAppium.DisConnectAppium()
    ConnectAppium.driver.start_session(ConnectAppium.desired_caps, None)
    print("断开重新建立APPIUM连接成功")
    ConnectAppiumAndAction()
    assert CheckDownloadSpeedBelowLimitedSpeed(
        '10.00MB/s') == True, '判断当前下载速度设置后,实际下载速度是否在设置速度值下方'
def test_main():
    # 通过webdriver包下面的Remote方法打开App
    ConnectAppium.DisConnectAppium()
    ConnectAppium.driver.start_session(ConnectAppium.desired_caps, None)
    print("断开重新建立APPIUM连接成功")
    ConnectAppiumAndAction()
    CheckUpdateBtn()
    assert CheckNewVersion() == 1, '判断当前版本是否有新版本'
def test_main():
    # 通过webdriver包下面的Remote方法打开App
    ConnectAppium.DisConnectAppium()
    ConnectAppium.driver.start_session(ConnectAppium.desired_caps, None)
    print("断开重新建立APPIUM连接成功")
    ConnectAppiumAndAction()
    ConnectAppium.driver.find_element_by_id('com.sunmi.ota:id/btn_main').click()
    ConnectAppium.driver.implicitly_wait(3)
    assert CheckDownloadFinishMD5Checked() == 2, '判断下载更新包完成后校验MD5值失败后点击重新下载,停止重试'
示例#9
0
def test_main():
    # 通过webdriver包下面的Remote方法打开App
    ConnectAppium.DisConnectAppium()
    ConnectAppium.driver.start_session(ConnectAppium.desired_caps, None)
    print("断开重新建立APPIUM连接成功")
    ConnectAppiumAndAction()
    DataToWIFIDownload()
    ConnectAppium.driver.implicitly_wait(5)
    ClearBackgroundApps()
    assert CheckOTAIsRunAtBackground() == True, 'WiFi状态下,清除任务管理器后,判断系统更新应用是否在后台运行(即OTA自动重启)'
def test_main():
    ConnectAppium.DisConnectAppium()
    ConnectAppium.driver.start_session(ConnectAppium.desired_caps, None)
    print("断开重新建立APPIUM连接成功")
    ConnectAppiumAndAction()
    ConnectAppium.driver.start_activity('com.android.settings', 'com.android.settings.Settings')
    ConnectAppium.driver.implicitly_wait(5)
    print("Success:切换进入设置应用成功")
    _find_by_scroll('About device')
    _find_by_scroll('System updates')
    assert CheckUpdateBtn() == True, '进入设置后查找系统更新按钮,进入后判断当前界面是否在系统更新界面'
示例#11
0
def test_main():
    # 通过webdriver包下面的Remote方法打开App
    ConnectAppium.DisConnectAppium()
    ConnectAppium.driver.start_session(ConnectAppium.desired_caps, None)
    print("断开重新建立APPIUM连接成功")
    ConnectAppiumAndAction()
    ConnectAppium.driver.find_element_by_id(
        'com.sunmi.ota:id/btn_main').click()
    ConnectAppium.driver.implicitly_wait(3)
    CheckDownloadFinishMD5Checked()
    downloadprogress = ConnectAppium.driver.find_element_by_id(
        'com.sunmi.ota:id/main_function_tv').text
    assert 'The update package is ready' in downloadprogress, '判断下载更新包完成后校验MD5值成功'
def test_main():
    # 通过webdriver包下面的Remote方法打开App
    ConnectAppium.DisConnectAppium()
    ConnectAppium.driver.start_session(ConnectAppium.desired_caps, None)
    print("断开重新建立APPIUM连接成功")
    ConnectAppiumAndAction()
    WIFIDownloadToDataDownload()
    ConnectAppium.driver.implicitly_wait(5)
    ConnectAppium.driver.find_element_by_id(
        'com.sunmi.ota:id/btn_main').click()
    ConnectAppium.driver.implicitly_wait(10)
    ConnectAppium.driver.find_element_by_id('com.sunmi.ota:id/ok').click()
    ConnectAppium.driver.implicitly_wait(5)
    assert GetConnectState() == 'DATA_ONLY', '判断当前下载网络是否是使用数据流量进行下载'
def test_main():
    # 通过webdriver包下面的Remote方法打开App
    ConnectAppium.DisConnectAppium()
    ConnectAppium.driver.start_session(ConnectAppium.desired_caps, None)
    print("断开重新建立APPIUM连接成功")
    ConnectAppiumAndAction()
    WIFIDownloadToDataDownload()
    ConnectAppium.driver.implicitly_wait(5)
    ConnectAppium.driver.find_element_by_id(
        'com.sunmi.ota:id/btn_main').click()
    ConnectAppium.driver.implicitly_wait(10)
    ConnectAppium.driver.find_element_by_id('com.sunmi.ota:id/cancle').click()
    ConnectAppium.driver.implicitly_wait(5)
    DownloadBtn = ConnectAppium.driver.find_element_by_id(
        'com.sunmi.ota:id/btn_main').text
    assert DownloadBtn == 'Continue to download', '判断当前下载网络切换至数据网络下载后取消立即下载是否继续下载更新包'
示例#14
0
def test_main():
    # 通过webdriver包下面的Remote方法打开App
    ConnectAppium.DisConnectAppium()
    ConnectAppium.driver.start_session(ConnectAppium.desired_caps, None)
    print("断开重新建立APPIUM连接成功")
    ConnectAppiumAndAction()
    DataToWIFIDownload()
    ConnectAppium.driver.implicitly_wait(5)
    ConnectAppium.driver.keyevent(187)
    ConnectAppium.driver.implicitly_wait(3)
    ConnectAppium.driver.find_element_by_id(
        'com.android.systemui:id/clean').click()
    ConnectAppium.driver.implicitly_wait(3)
    ConnectAppium.driver.start_activity(appPackage, appActivity)
    ConnectAppium.driver.implicitly_wait(3)
    DownloadBtn = ConnectAppium.driver.find_element_by_id(
        'com.sunmi.ota:id/btn_main').text
    assert DownloadBtn == 'Suspend the download', '判断当前下载网络是否是wifi网络,切换至WiFi网络后自动下载更新包'
示例#15
0
def test_main():
    # 通过webdriver包下面的Remote方法打开App
    ConnectAppium.DisConnectAppium()
    ConnectAppium.driver.start_session(ConnectAppium.desired_caps, None)
    print("断开重新建立APPIUM连接成功")
    ConnectAppiumAndAction()
    ClearAppData('System Update')
    ConnectAppium.DisConnectAppium()
    setting_desired_caps = {
        'platformName': platformName,
        'platformVersion': platformVersion,
        'deviceName': deviceName,
        'appPackage': 'cn.test.filldata',
        'appActivity': 'cn.test.filldata.FillData',
        'newCommandTimeout': '2000'
    }
    ConnectAppium.driver.start_session(setting_desired_caps, None)
    print("断开重新建立APPIUM连接成功,进入设置应用")
    CheckOTAFullStorageTips()
    ConnectAppium.driver.implicitly_wait(3)
    FlagTips = 0
    if isElement('id', 'com.sunmi.ota:id/dialog_title'):
        print('Success:进入系统更新应用,提示内存空间不足,点击取消退出应用')
        ConnectAppium.driver.find_element_by_id(
            'com.sunmi.ota:id/cancle').click()
        ConnectAppium.driver.implicitly_wait(5)
        FlagTips = 1
    elif isElement('id', 'android:id/button1'):
        print('Success:进入系统更新应用,提示内存空间不足,点击取消退出应用')
        ConnectAppium.driver.find_element_by_id('android:id/button1').click()
        ConnectAppium.driver.implicitly_wait(5)
        FlagTips = 1
    else:
        ConnectAppium.driver.implicitly_wait(3)
    ReleaseFillDataApp()
    assert FlagTips == 1, '判断存储空间满时,进入OTA检查是否有弹框提示'
def test_main():
    # 通过webdriver包下面的Remote方法打开App
    ConnectAppiumAndAction()
    assert CheckUpdateBtn() == True, '判断当前界面是否在系统更新界面'