def setup_class(cls): log.info('清除服务器缓存文件') run_bat('clear_session.bat') log.info('导入数据库测试数据') read_sql('mirrormx_customer_chat_talk2.sql') read_sql('mirrormx_customer_chat_message2.sql') read_sql('mirrormx_customer_chat_data.sql') read_sql('mirrormx_customer_chat_shared_file.sql') read_sql('mirrormx_customer_chat_upload.sql') # 主测试机的初始化设置 cls.driver = GetDriver.get_app_driver() cls.user = PageUserList(cls.driver) cls.fwq = PageFwq(cls.driver) cls.login = PageLogin(cls.driver) cls.user.base_if_app_is_install('net.mirrormx.livechat') cls.driver.start_activity('net.mirrormx.livechat', '.MainActivity') if float(cap2['platformVersion']) >= 8: log.info('正在处理高版本系统的弹窗') cls.driver.switch_to.alert.accept() cls.fwq.page_hand_add_fwq( '我的服务器', 'http://192.168.1.10/kefu/php/app.php?mobile-api') cls.login.page_login('我的服务器', 'http://192.168.1.10/kefu/php/app.php?mobile-api', username='******', password='******') # 辅助测试机初始化设置 cls.driver2 = GetDriver.get_app_driver2() cls.driver3 = GetDriver.get_app_driver3() cls.user.page_other_help(cls.driver2, cls.driver3)
def setup_class(cls): cls.driver = GetDriver.get_app_driver() cls.fwq = PageFwq(cls.driver) cls.fwq.base_if_app_is_install('net.mirrormx.livechat') cls.driver.start_activity('net.mirrormx.livechat', '.MainActivity') if float(cap2['platformVersion']) >= 8: log.info('正在处理高版本系统的弹窗') cls.driver.switch_to.alert.accept()
def setup_class(cls): cls.driver = GetDriver.get_app_driver() cls.login = PageLogin(cls.driver) cls.fwq = PageFwq(cls.driver) cls.login.base_if_app_is_install('net.mirrormx.livechat') cls.driver.start_activity('net.mirrormx.livechat', '.MainActivity') if float(cap2['platformVersion']) >= 8: log.info('正在处理高版本系统的弹窗') cls.driver.switch_to.alert.accept() cls.fwq.page_hand_add_fwq( '我的服务器', 'http://192.168.1.10/kefu/php/app.php?mobile-api')
def setup_class(cls): log.info('导入数据库测试数据') read_sql('mirrormx_customer_chat_talk_history.sql') read_sql('mirrormx_customer_chat_message_history.sql') read_sql('mirrormx_customer_chat_data.sql') read_sql('mirrormx_customer_chat_shared_file.sql') read_sql('mirrormx_customer_chat_upload.sql') cls.driver = GetDriver.get_app_driver() cls.history = PageHistory(cls.driver) cls.fwq = PageFwq(cls.driver) cls.login = PageLogin(cls.driver) cls.history.base_if_app_is_install('net.mirrormx.livechat') cls.driver.start_activity('net.mirrormx.livechat', '.MainActivity') if float(cap2['platformVersion']) >= 8: log.info('正在处理高版本系统的弹窗') cls.driver.switch_to.alert.accept() cls.fwq.page_hand_add_fwq( '我的服务器', 'http://192.168.1.10/kefu/php/app.php?mobile-api') cls.login.page_login('我的服务器', 'http://192.168.1.10/kefu/php/app.php?mobile-api', username='******', password='******') cls.history.page_history_enter()
def setup_class(cls): cls.driver = GetDriver.get_app_driver() cls.xx = PageXx(cls.driver) cls.xx.base_click_element(page.approve) PageLogin(cls.driver).pagelogin() cls.xx.base_click_element(page.xx_menu)
def setup_class(cls): cls.driver = GetDriver.get_app_driver() cls.login = PageLogin(cls.driver) cls.login.base_click_element(page.approve)
def setup_class(cls): cls.driver = GetDriver.get_app_driver() cls.glsx = PageGlsx(cls.driver) cls.glsx.base_click_element(page.approve)
def setup_class(cls): cls.driver = GetDriver.get_app_driver()