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)
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)
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)
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()
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()
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)