示例#1
0
 def add(self, subfolder):
     self.add_subfolder()
     wait_for(lambda: self.selected_field_element is not None, num_sec=5, delay=0.1)
     sel.double_click(self.selected_field_element)
     input = wait_for(
         lambda: sel.elements("./input", root=self.selected_field_element),
         num_sec=5, delay=0.1, fail_condition=[])[0][0]
     sel.set_text(input, subfolder)
     sel.send_keys(input, Keys.RETURN)
示例#2
0
 def add(self, subfolder):
     self.add_subfolder()
     wait_for(lambda: self.selected_field_element is not None, num_sec=5, delay=0.1)
     sel.double_click(self.selected_field_element)
     input = wait_for(
         lambda: sel.elements("./input", root=self.selected_field_element),
         num_sec=5, delay=0.1, fail_condition=[])[0][0]
     sel.set_text(input, subfolder)
     sel.send_keys(input, Keys.RETURN)
示例#3
0
 def add(self, subfolder):
     self.add_subfolder()
     wait_for(lambda: self.selected_field_element is not None, num_sec=5, delay=0.1)
     sel.double_click(self.selected_field_element, wait_ajax=False)
     if version.current_version() < "5.5.0.7":
         input = wait_for(
             lambda: sel.elements("./input", root=self.selected_field_element),
             num_sec=5, delay=0.1, fail_condition=[])[0][0]
         sel.set_text(input, subfolder)
         sel.send_keys(input, Keys.RETURN)
     else:
         sel.handle_alert(prompt=subfolder)
示例#4
0
 def add(self, subfolder):
     self.add_subfolder()
     wait_for(lambda: self.selected_field_element is not None, num_sec=5, delay=0.1)
     sel.double_click(self.selected_field_element, wait_ajax=False)
     if version.current_version() < "5.5.0.7":
         input = wait_for(
             lambda: sel.elements("./input", root=self.selected_field_element),
             num_sec=5, delay=0.1, fail_condition=[])[0][0]
         sel.set_text(input, subfolder)
         sel.send_keys(input, Keys.RETURN)
     else:
         sel.handle_alert(prompt=subfolder)
示例#5
0
def press_enter_after_password():
    """
    Convenience function to send a carriange return at the end of the password field.
    """
    sel.send_keys(page.password, Keys.RETURN)
示例#6
0
def import_reports(filename, overwrite=False):
    sel.force_navigate("import_export")
    sel.checkbox(form.import_overwrite, overwrite)
    sel.send_keys(form.import_file, filename)
    sel.click(form.import_submit)
    flash.assert_no_errors()
示例#7
0
def import_reports(filename, overwrite=False):
    navigate_to(Report, 'ImportExport')
    sel.checkbox(form.import_overwrite, overwrite)
    sel.send_keys(form.import_file, filename)
    sel.click(form.import_submit)
    flash.assert_no_errors()
示例#8
0
def _fill_rss_str(erf, s):
    try:
        sel.select(erf.form.rss_url, s)
    except NoSuchElementException:
        sel.select(erf.form.rss_url, "<Enter URL Manually>")
        sel.send_keys(erf.form.txt_url, s)
示例#9
0
def _fill_rss_str(erf, s):
    try:
        sel.select(erf.form.rss_url, s)
    except NoSuchElementException:
        sel.select(erf.form.rss_url, "<Enter URL Manually>")
        sel.send_keys(erf.form.txt_url, s)
示例#10
0
def press_enter_after_password():
    """
    Convenience function to send a carriange return at the end of the password field.
    """
    sel.send_keys(page.password, Keys.RETURN)
示例#11
0
def import_reports(filename, overwrite=False):
    sel.force_navigate("import_export")
    sel.checkbox(form.import_overwrite, overwrite)
    sel.send_keys(form.import_file, filename)
    sel.click(form.import_submit)
    flash.assert_no_errors()