def navigate_to_edit_registration_form(self, entity_type, close_warning=False): self.driver.go_to(url("/entity/subject/edit/%s/" % entity_type.lower())) if close_warning: self.driver.find(CONTINUE_EDITING_BUTTON).click() return QuestionnaireTabPage(self.driver)
def save_questionnaire_successfully(self): """ Function to save subject questionnaire Args: subject_data is data to fill in the different fields Return CreateQuestionnairePage """ self.driver.find(SAVE_CHANGES_BTN).click() self.driver.wait_for_page_with_title( WAIT_FOR_TITLE, "Questionnaire") return QuestionnaireTabPage(self.driver)
def continue_to_questionnaire_page(self): self.driver.wait_for_element(UI_TEST_TIMEOUT, CONTINUE_BTN, True) self.driver.find(CONTINUE_BTN).click() return QuestionnaireTabPage(self.driver)
def go_to_create_questionnaire_page(self): self.driver.find(CONTINUE_BTN).click() return QuestionnaireTabPage(self.driver)
def create_project(self, create_project_page): create_project_page.create_project_with(VALID_DATA_FOR_PROJECT) create_project_page.continue_create_project() return QuestionnaireTabPage(self.driver)
def go_to_create_questionnaire_page(self): self.driver.wait_for_element(UI_TEST_TIMEOUT, CONTINUE_BTN) self.driver.find(CONTINUE_BTN).click() return QuestionnaireTabPage(self.driver)
def navigate_to_questionnaire_tab(self): self.driver.find(QUESTIONNAIRE_TAB).click() self.driver.wait_for_page_load() from pages.questionnairetabpage.questionnaire_tab_page import QuestionnaireTabPage return QuestionnaireTabPage(self.driver)
def navigate_to_edit_project_page(self): self.driver.find(PROJECT_EDIT_LINK).click() from pages.questionnairetabpage.questionnaire_tab_page import QuestionnaireTabPage return QuestionnaireTabPage(self.driver)
def navigate_to_questionnaire_tab(self): self.driver.find(QUESTIONNAIRE_TAB).click() return QuestionnaireTabPage(self.driver)