Beispiel #1
0
 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)
Beispiel #2
0
 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()
Beispiel #3
0
 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 page_other_help(self, driver2, driver3):
        log.info('初始化另外两个手机')
        other_user_list_obj = []
        other_page_login_obj = []
        for i in [driver2, driver3]:
            # for i in [driver2]:
            PageUserList(i).base_if_app_is_install('net.mirrormx.livechat')
            i.start_activity('net.mirrormx.livechat', '.MainActivity')
            try:
                log.info('正在处理高版本系统的弹窗')
                i.switch_to.alert.accept()
            except:
                pass
            PageFwq(i).page_hand_add_fwq(
                '我的服务器', 'http://192.168.1.10/kefu/php/app.php?mobile-api')
            other_user_list_obj.append(PageUserList(i))
            other_page_login_obj.append(PageLogin(i))

        log.info('辅助测试机登录')
        n = 0
        for m in ['*****@*****.**', '*****@*****.**']:
            # for m in ['*****@*****.**']:
            other_page_login_obj[n].page_login(
                '我的服务器',
                'http://192.168.1.10/kefu/php/app.php?mobile-api',
                username=m,
                password='******')
            n += 1

        log.info('辅助测试机分别向主测试发送消息')
        other_user_list_obj[0].page_user_click_user('*****@*****.**')
        other_user_list_obj[0].page_user_click_details_send_btn()
        other_user_list_obj[0].page_input_message('我是03,发给05,这是一条测试信息')
        other_user_list_obj[0].page_click_send_btn()
        other_user_list_obj[0].page_user_go_back_from_conversation()
        other_user_list_obj[0].page_user_go_back_from_details()
        other_user_list_obj[0].page_user_click_user('*****@*****.**')
        other_user_list_obj[0].page_user_click_details_send_btn()
        other_user_list_obj[0].page_input_message('我是03,发给04,这是一条测试信息')
        other_user_list_obj[0].page_click_send_btn()
        other_user_list_obj[0].page_user_go_back_from_conversation()
        other_user_list_obj[0].page_user_go_back_from_details()
Beispiel #5
0
 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()