Exemplo n.º 1
0
 def test_691(self):
     """Pagedemo New York Times video 1 - forked the subs and create a fresh set of captions in hr lang.
     
     http://litmus.pculture.org/show_test.cgi?id=691
     """
     test_id = 691
     sel = self.selenium
     testpage = "/pagedemo/nytimes_youtube_embed"
     subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],"OctopusGarden.txt")
     sel.open(testpage)
     sel.wait_for_page_to_load(testvars.timeout)
     sel.window_maximize()
     mslib.wait_for_element_present(self,sel,testvars.WebsiteUI["SubtitleMe_menu"])
     time.sleep(5)
     sel.get_eval('this.browserbot.getUserWindow().unisubs.widget.Widget.getAllWidgets()[0].openMenu()')
     widget.open_starter_dialog(self,sel)
     widget.starter_dialog_fork(self,sel,to_lang='hr')
     widget.transcribe_video(self, sel, subtextfile)
     widget.sync_video(self, sel, subtextfile)
     widget.site_login_from_widget_link(self,sel)
     #verify subs still present
     print "verifying subtitles are still present"
     sel.select_window("null")
     mslib.wait_for_element_present(self,sel,"css=.unisubs-titlesList")
     widget.verify_sub_text(self,sel,subtextfile)
     if sel.is_element_present("css=.unisubs-modal-login"): #Login
         sel.click("css=.unisubs-log")
         widget.site_login_auth(self,sel)
         sel.select_window("null")
     widget.submit_sub_edits(self,sel,offsite=True)
def edit_subs(self,sel,orig_rev,subtextfile):
        widget.goto_step(self,sel,"2")
        time.sleep(3)
        widget.edit_text(self,sel,subtextfile)
        widget.site_login_from_widget_link(self,sel)
        widget.submit_sub_edits(self,sel,offsite=True)
        mslib.wait_for_element_present(self,sel,testvars.offsite_goto_subs)
        sel.click(testvars.offsite_goto_subs)
        ###
        sel.wait_for_page_to_load(testvars.timeout)
        vid_title = sel.get_text(testvars.vid_title)
        print " * verify edits"
        mslib.wait_for_element_present(self,sel,testvars.video_video_info)
        history_text = sel.get_text("css=tr td:nth-child(1)")
        print history_text
        sel.click(testvars.video_original)
        mslib.wait_for_element_present(self,sel,testvars.history_tab)
        sel.click(testvars.history_tab)
        mslib.wait_for_element_present(self,sel,testvars.video_compare_revisions)
def edit_subs(self, sel, orig_rev, subtextfile):
    widget.goto_step(self, sel, "2")
    time.sleep(3)
    widget.edit_text(self, sel, subtextfile)
    widget.site_login_from_widget_link(self, sel)
    widget.submit_sub_edits(self, sel, offsite=True)
    mslib.wait_for_element_present(self, sel, testvars.offsite_goto_subs)
    sel.click(testvars.offsite_goto_subs)
    ###
    sel.wait_for_page_to_load(testvars.timeout)
    vid_title = sel.get_text(testvars.vid_title)
    print " * verify edits"
    mslib.wait_for_element_present(self, sel, testvars.video_video_info)
    history_text = sel.get_text("css=tr td:nth-child(1)")
    print history_text
    sel.click(testvars.video_original)
    mslib.wait_for_element_present(self, sel, testvars.history_tab)
    sel.click(testvars.history_tab)
    mslib.wait_for_element_present(self, sel, testvars.video_compare_revisions)
Exemplo n.º 4
0
 def test_416(self):
     """Widget Step 3, login link functionality.
     
     http://litmus.pculture.org/show_test.cgi?id=416
     """
     print "starting testcase 416"
     sel = self.selenium
     sel.set_timeout(testvars.MSTestVariables["TimeOut"])
     subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                "switch-to-firefox.txt")
     # be sure logged out
     website.SiteLogout(self, sel)
     website.start_demo(self, sel)
     website.start_sub_widget(self, sel, login=False)
     widget.transcribe_video(self, sel, subtextfile)
     widget.sync_video(self, sel, subtextfile)
     widget.site_login_from_widget_link(self, sel)
     #verify subs still present
     print "verifying subtitles are still present"
     sel.select_window("null")
     mslib.wait_for_element_present(self, sel, "css=.unisubs-titlesList")
     widget.verify_sub_text(self, sel, subtextfile)