Esempio n. 1
0
    def get_flash_message(self):
        """
        Function to fetch the flash message from flash label of the add subject page

        Return message
        """
        comm_utils = CommonUtilities(self.driver)
        comm_utils.wait_for_element(5, FLASH_MESSAGE_LABEL)
        return self.driver.find(FLASH_MESSAGE_LABEL).text
Esempio n. 2
0
    def get_response_message(self):
        """
        Function to fetch the success/error response message from flash label of the page

        Return success/error message
        """
        comm_utils = CommonUtilities(self.driver)
        comm_utils.wait_for_element(10, FLASH_MSG_LABEL)
        return self.driver.find(FLASH_MSG_LABEL).text
    def get_flash_message(self):
        """
        Function to fetch the flash message from flash label of the register
         subject page

        Return message
        """
        comm_utils = CommonUtilities(self.driver)
        comm_utils.wait_for_element(5, FLASH_MESSAGE_LABEL)
        return self.driver.find(FLASH_MESSAGE_LABEL).text
Esempio n. 4
0
    def get_error_message(self):
        """
        Function to fetch the error messages from error label of the login
        page

        Return error message
        """
        error_message = ""
        comm_utils = CommonUtilities(self.driver)
        comm_utils.wait_for_element(10,ERROR_MESSAGE_LABEL)
        locators = self.driver.find_elements_(ERROR_MESSAGE_LABEL)
        if locators:
            for locator in locators:
                error_message = error_message + locator.text
        return error_message.replace("\n", " ")
Esempio n. 5
0
    def get_success_message(self):
        """
        Function to fetch the success message from label of the questionnaire page

        Return success message
        """
        comm_utils = CommonUtilities(self.driver)
        if comm_utils.wait_for_element(10, SUCCESS_MESSAGE_LABEL):
            return self.driver.find(SUCCESS_MESSAGE_LABEL).text
        else:
            return "Success message not appeared on the page."
Esempio n. 6
0
 def registration_success_message(self):
     com_util = CommonUtilities(self.driver)
     com_util.wait_for_element(15, WELCOME_MESSAGE_LI)
     success_message = self.driver.find(WELCOME_MESSAGE_LI).text
     return success_message
 def registration_success_message(self):
     com_util = CommonUtilities(self.driver)
     com_util.wait_for_element(15, WELCOME_MESSAGE_LI)
     success_message = self.driver.find(WELCOME_MESSAGE_LI).text
     return success_message