def test_k_sellcoupon_search(self):
        """
        卖券活动查询
        :return:
        """
        homepage = ActivityPage(self.driver)
        homepage.search_click_activity_sellcoupon()
        homepage.sleep(3)
        homepage.get_window_img()
        try:
            assert '卖券活动' in homepage.find_tab_sellcoupon()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))

        newsearch = SellCouponSearch(self.driver)

        # 活动ID查询
        newsearch.activityid_search('34')
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert '34' in newsearch.find_result_activityid()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 活动标题查询
        newsearch.activitytitle_search('测试')
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert '测试' in newsearch.find_result_activitytitle()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 活动启用状态查询
        newsearch.activityenablestatus_search()
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert 'el-icon-circle-check' in newsearch.find_result_activityenablestatus(
            )
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 刷新页面
        homepage.refresh()
    def test_b_voucher_search(self):
        """
        现金券管理查询
        :return:
        """
        homepage = ActivityPage(self.driver)
        homepage.search_click_activity()
        homepage.sleep(3)
        homepage.search_click_activity_voucher()
        homepage.sleep(3)
        homepage.get_window_img()
        try:
            assert '现金券管理' in homepage.find_tab_voucher()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))

        newsearch = VoucherSearch(self.driver)

        # 活动ID查询
        newsearch.activityid_search('36680')
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert '36680' in newsearch.find_result_activityid()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 活动标题查询
        newsearch.activitytitle_search('测试合同非自营大场景2测试券')
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert '测试合同非自营大场景2测试券' in newsearch.find_result_activitytitle()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 活动状态查询
        newsearch.activitystatus_search()
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert '未生效' in newsearch.find_result_activitystatus()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 发放方式查询
        newsearch.distributionmethod_search()
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert '用户领取' in newsearch.find_result_distributionmethod()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 区域限制类型查询
        newsearch.arearestrictiontype_search()
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert '网点' in newsearch.find_result_arearestrictiontype()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 现金券类型查询
        newsearch.vouchertype_search()
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert '普通现金券' in newsearch.find_result_vouchertype()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 现金券码查询
        newsearch.vouchercode_search('294650991021')
        newsearch.search_button_click()
        newsearch.sleep(2)
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 刷新页面
        homepage.refresh()
    def test_h_cardactivity_search(self):
        """
        卡券活动查询
        :return:
        """
        homepage = ActivityPage(self.driver)
        homepage.search_click_activity_cardactivity()
        homepage.sleep(3)
        homepage.get_window_img()
        try:
            assert '卡券活动' in homepage.find_tab_cardactivity()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))

        newsearch = CardActivitySearch(self.driver)

        # 标题查询
        newsearch.title_search('测试')
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert '测试' in newsearch.find_result_title()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 区域限制类型查询
        newsearch.arearestrictiontype_search()
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert '网点' in newsearch.find_result_arearestrictiontype()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 启用状态查询
        newsearch.enablestatus_search()
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert 'el-icon-circle-check' in newsearch.find_result_enablestatus(
            )
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 刷新页面
        homepage.refresh()
    def test_g_retention_search(self):
        """
        挽留机制查询
        :return:
        """
        homepage = ActivityPage(self.driver)
        homepage.search_click_activity_retention()
        homepage.sleep(3)
        homepage.get_window_img()
        try:
            assert '挽留机制' in homepage.find_tab_retention()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))

        newsearch = RetentionSearch(self.driver)

        # 标题查询
        newsearch.title_search('测试')
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert '测试' in newsearch.find_result_title()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 启用状态查询
        newsearch.enablestatus_search()
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert 'el-icon-circle-check' in newsearch.find_result_enablestatus(
            )
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 刷新页面
        homepage.refresh()
    def test_f_directredenvelopes_search(self):
        """
        直通红包查询
        :return:
        """
        homepage = ActivityPage(self.driver)
        homepage.search_click_activity_directredenvelopes()
        homepage.sleep(3)
        homepage.get_window_img()
        try:
            assert '直通红包' in homepage.find_tab_directredenvelopes()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))

        newsearch = DirectRedEnvelopesSearch(self.driver)

        # 活动ID查询
        newsearch.activityid_search('1312')
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert '1312' in newsearch.find_result_activityid()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 活动标题查询
        newsearch.activitytitle_search('测试')
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert '测试' in newsearch.find_result_activitytitle()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 优惠券类型查询
        newsearch.coupontype_search()
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert '满减券' in newsearch.find_result_coupontype()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 活动启用状态查询
        newsearch.activityenablestatus_search()
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert 'el-icon-circle-check' in newsearch.find_result_activityenablestatus(
            )
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 刷新页面
        homepage.refresh()
    def test_e_freediscount_search(self):
        """
        闲时优惠查询
        :return:
        """
        homepage = ActivityPage(self.driver)
        homepage.search_click_activity_freediscount()
        homepage.sleep(3)
        homepage.get_window_img()
        try:
            assert '闲时优惠' in homepage.find_tab_freediscount()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))

        newsearch = FreeDiscountSearch(self.driver)

        # 闲时活动标题查询
        newsearch.freeactivitytitle_search('测试')
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert '测试' in newsearch.find_result_freeactivitytitle()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 是否启用查询
        newsearch.isenable_search()
        newsearch.search_button_click()
        newsearch.sleep(2)
        try:
            assert 'el-icon-circle-check' in newsearch.find_result_isenable()
            print('Test Pass')
        except Exception as e:
            print('Test Fail', format(e))
        newsearch.empty_button_click()
        newsearch.sleep(2)

        # 刷新页面
        homepage.refresh()