Exemplo n.º 1
0
    def test_search_ad_after_release_ns_video_ad_3(self, testdata):

        ad_name = testdata.get("广告片名称")
        ad_duration = testdata.get("视频时长")
        filepath = testdata.get("视频文件路径")
        auto_create_name = testdata.get("是否自动生成广告片名称(Y|N)", "N")
        fn_name = helper.get_caller_name()
        if auto_create_name.upper() == 'Y'.upper():
            ad_name = settings.AD_NAME_PREFIX + SerialNumbersGenerator().serial_numbers
        ipage = IndexPage(settings.URLS['首页'])
        ipage.actions.click_tabbar().sleep(1).click_home_tab().sleep(1)
        ipage.actions.click_make_ad_btn().sleep(1).click_notice_dialog_close_btn().sleep(1).screenshot('{}_选项页面_'.format(fn_name))
        ipage.actions.click_select_upload_video_btn().sleep(2).input_upload_video_path(filepath).sleep(3)  # 需要等待回到剪切界面

        clip_page = ClipPage()
        clip_page.actions.preview().sleep(2).screenshot('{}_预览界面_'.format(fn_name)).sleep(3)

        ppage = PreviewPage()
        ppage.actions.input_title(ad_name).release().sleep(3).screenshot('{}_发布界面_'.format(fn_name)).sleep(3).confirm().sleep(10)
        home_page = HomePage()
        home_page.actions.sleep(1).data().sleep(1).adlist().sleep(2)

        al_page = ADListPage()
        rowinfo = {
            "ad_name": ad_name,
            "ad_duration": ad_duration,
        }
        al_page.actions.ad_name(ad_name).sleep(1).search().sleep(3).check_adlist_table(rowinfo)
Exemplo n.º 2
0
    def test_jump_page_of_click_upload_ad(self, testdata):

        fn_name = helper.get_caller_name()
        ipage = IndexPage(settings.URLS['首页'])
        ipage.actions.click_tabbar().sleep(1).click_home_tab().sleep(
            1).click_cinema_ad_btn()
        clpage = CinemaListPage()
        clpage.actions.sleep(1).screenshot(
            '{}_影院列表_'.format(fn_name)).is_page_self(
                settings.URLS['影院列表']).upload_ad().sleep(2)
        p = MyAdListPage()
        p.actions.screenshot('{}_我的广告素材_'.format(fn_name)).is_page_self()