Exemplo n.º 1
0
class InterviewModulePage:
    __e_interview_module_xpath = Locators.TITLE['title'].format('Interview Module')
    __e_new_form_xpath = Locators.ACCOUNT['new_form']
    __e_click_radio_css = Locators.BUTTONS['radio']

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.scroll = PageScroll(self.driver)
        self.notifier = Notifier(self.driver)

    def interview_module(self):
        try:
            self.scroll.down(0, -100)
            time.sleep(0.5)
            self.wait.web_element_wait_click(By.XPATH, self.__e_interview_module_xpath, 'interview_module')
            time.sleep(1)
            return True
        except Exception as error:
            ui_logger.error(error)

    def new_form_setting(self):
        try:
            self.scroll.down(0, -100)
            self.wait.web_element_wait_click(By.XPATH, self.__e_new_form_xpath, 'new_form_setting')
            return True
        except Exception as error:
            ui_logger.error(error)

    def enable_new_form(self):
        try:
            time.sleep(1)
            self.wait.web_elements_wait_multiple_click(By.CSS_SELECTOR, self.__e_click_radio_css, 'On')
            return True
        except Exception as error:
            ui_logger.error(error)

    def disable_new_form(self):
        try:
            time.sleep(1)
            self.wait.web_elements_wait_multiple_click(By.CSS_SELECTOR, self.__e_click_radio_css, 'Off')
            return True
        except Exception as error:
            ui_logger.error(error)

    def save_notifier(self, message):
        try:
            time.sleep(0.8)
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            time.sleep(0.5)
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 2
0
class DuplicityCheck:

    __e_click_radio_css = Locators.BUTTONS['radio']

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)

    def do_not_allow_duplicates(self, button_name):
        try:
            self.wait.web_elements_wait_click(By.CSS_SELECTOR, self.__e_click_radio_css, button_name)
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def req_duplicity_notifier(self, message):
        try:
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def req_duplicity_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 3
0
class EventConfiguration:

    __e_click_radio_css = Locators.BUTTONS['radio']
    __e_user_id_xpath = Locators.TITLE['title'].format('Current Status')
    __e_search_user_xpath = Locators.TITLE['title'].format('Type here to search')
    __e_select_search_item_xpath = Locators.MULTI_SELECTIONS['moveAllItemsRight']
    __e_done_button_xpath = Locators.BUTTONS['done']
    __e_save_button_xpath = Locators.BUTTONS['button'].format('save')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)

    def on_off_buttons(self, button_name):
        try:
            time.sleep(1)
            self.wait.web_elements_wait_multiple_click(By.CSS_SELECTOR, self.__e_click_radio_css, button_name)
            return True
        except Exception as error:
            ui_logger.error(error)

    def user_id_chat(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_user_id_xpath, 'chat_user_filed_click')
            return True
        except Exception as error:
            ui_logger.error(error)

    def search_user_chat(self, user_name):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_search_user_xpath, user_name, 'search_chat_user')
            self.wait.web_element_wait_click(By.XPATH, self.__e_select_search_item_xpath, 'Move_all_items')
            self.wait.web_element_wait_click(By.XPATH, self.__e_done_button_xpath, 'Done_button')
            return True
        except Exception as error:
            ui_logger.error(error)

    def enable_disable_button(self, button_name):
        try:
            self.wait.web_elements_wait_click(By.CSS_SELECTOR, self.__e_click_radio_css, button_name)
            return True
        except Exception as error:
            ui_logger.error(error)

    def save_buttons(self, button_name, message):
        try:
            self.wait.web_elements_wait_multiple_click(By.XPATH, self.__e_save_button_xpath, button_name)
            self.notifier.glowing_messages(message)
            self.notifier.dismiss_message()
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 4
0
class SelectionProcessPage:
    __e_job_sp_xpath = Locators.PLACEHOLDER['place_holder'].format(
        'Selection Process')
    __e_job_sp_save_xpath = Locators.BUTTONS['button'].format('Save')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)

    def job_sp(self, selection_process):
        try:
            time.sleep(2)
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_job_sp_xpath,
                                                 selection_process,
                                                 'Send_Selection_Process')
            self.wait.drop_down_selection()
            print(f'selected - {selection_process} selection process')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_sp_save(self):
        try:
            time.sleep(1)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_job_sp_save_xpath,
                                             'Saved_Selection_Process')
            print('saved - selection process')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_sp_notifier(self, message):
        try:
            time.sleep(0.7)
            self.notifier.glowing_messages(message)
            self.notifier.dismiss_message()
            return True
        except Exception as error:
            ui_logger.error(error)

    def page_refresh(self):
        try:
            self.wait.refresh_page()
            print('Page - Refreshed')
            self.wait.loading()
            time.sleep(2)
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 5
0
class CandidatePage:
    __e_task_behalf_of_xpath = Locators.TITLE['title'].format(
        'Submit Tasks on Behalf of Candidate')
    __e_acceptance_name = Locators.EMBRACE['candidate_acceptance_yes']
    __e_submit_xpath = Locators.BUTTONS['button'].format('Submit')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)

    def behalf_of_submit_task(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_task_behalf_of_xpath,
                                             'behalf_of_submit_task')
            return True
        except Exception as error:
            ui_logger.error(error)

    def candidate_acceptance_yes(self):
        try:
            time.sleep(1)
            self.wait.web_element_wait_click(By.NAME, self.__e_acceptance_name,
                                             'candidate_acceptance_yes')
            return True
        except Exception as error:
            ui_logger.error(error)

    def submit_task(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_submit_xpath,
                                             'submit_task')
            return True
        except Exception as error:
            ui_logger.error(error)

    def submit_task_notifier(self, message):
        try:
            self.wait.embrace_loading()
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def submit_task_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            time.sleep(0.5)
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 6
0
class EventOwnersConfigPage:

    __e_owners_update_xpath = Locators.BUTTONS['button'].format('Update')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.scroll = PageScroll(self.driver)
        self.notifier = Notifier(self.driver)

    def event_owners_update(self):
        try:
            self.scroll.down(0, -50)
            time.sleep(0.5)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_owners_update_xpath,
                                             'event_owners_update')
            print('Event Owners update button - Clicked')
            time.sleep(1)
            self.wait.loading()
            self.scroll.up(0, 70)
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_owners_notifier(self, message):
        try:
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_owners_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            self.wait.loading()
            self.scroll.up(0, 70)
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 7
0
class EventTestConfigPage:
    __e_event_test_config_btn_xpath = Locators.BUTTONS[
        'btnActionClicked'].format("'", 'configure', "'")
    __e_job_name_xpath = Locators.PLACEHOLDER['text_ph'].format('Job Role')
    __e_stage_xpath = Locators.PLACEHOLDER['text_ph'].format('Stage')
    __e_test_xpath = Locators.PLACEHOLDER['text_ph'].format('Test')
    __e_test_active_css = Locators.BUTTONS['radio']
    __e_test_save_xpath = Locators.BUTTONS['button'].format('Save')
    __e_test_config_cancel_xpath = Locators.BUTTONS['all_buttons'].format(
        'CANCEL')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)

    def event_test_configure_button(self):
        try:
            self.wait.web_element_wait_click(
                By.XPATH, self.__e_event_test_config_btn_xpath,
                'event_test_configure_button')
            print('Event Test Configuration button - Clicked')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def test_job_name_field(self, job_name):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_job_name_xpath,
                                                 job_name,
                                                 'test_job_name_field')
            self.wait.drop_down_selection()
            print(f'Test Configuration Job Name - {job_name} - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def test_stage_name_field(self, stage_name):
        try:
            time.sleep(0.8)
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_stage_xpath,
                                                 stage_name,
                                                 'test_job_name_field')
            self.wait.drop_down_selection()
            print(f'Test Configuration stage Name - {stage_name} - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def test_test_name_field(self, test_name):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_test_xpath,
                                                 test_name,
                                                 'test_job_name_field')
            self.wait.drop_down_selection()
            print(
                f'Test Configuration Assessment Name - {test_name} - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def test_active_enable(self):
        try:
            time.sleep(0.6)
            button = ' On'
            self.wait.web_elements_wait_multiple_click(
                By.CSS_SELECTOR, self.__e_test_active_css, button)
            print(f'Event Ec - {button} - Selected')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_test_configure_save(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_test_save_xpath,
                                             'event_test_configure_save')
            print('Event Test Configuration Save - Clicked')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def test_tag_notifier(self, message):
        try:
            time.sleep(0.7)
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def test_tag_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            time.sleep(0.7)
            return True
        except Exception as error:
            ui_logger.error(error)

    def cancel_test_extra_config(self):
        try:
            self.wait.loading()
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_test_config_cancel_xpath,
                                             'cancel_test_extra_config')
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 8
0
class EligibilityCriteriaPage:
    __e_job_config_btn_xpath = Locators.BUTTONS['btnActionClicked'].format("'", 'configureEC', "'")
    __e_ec_xpath = Locators.PLACEHOLDER['text_ph'].format('Select Eligibility Criteria')
    __e_positive_stage_xpath = Locators.PLACEHOLDER['text_ph'].format('Select Stage')
    __e_positive_status_xpath = Locators.PLACEHOLDER['text_ph'].format('Select status')
    __e_negative_stage_xpath = Locators.JOB['Ec_negative_stage']
    __e_negative_status_xpath = Locators.JOB['Ec_negative_status']
    __e_ec_save_xpath = Locators.BUTTONS['ec_save']

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)
        self.scroll = PageScroll(self.driver)

    def job_configure_button(self):
        try:
            self.wait.loading()
            self.scroll.down(0, -200)
            self.wait.web_element_wait_click(By.XPATH, self.__e_job_config_btn_xpath, 'job_configure_button')
            self.wait.loading()
            print('Job Configuration button - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_ec_field(self, eligibility_criteria):
        try:
            time.sleep(1)
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_ec_xpath, eligibility_criteria,
                                                 'job_ec_field')
            self.wait.drop_down_selection()
            print('Job Eligibility Criteria - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_positive_stage_field(self, stage):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_positive_stage_xpath, stage,
                                                 'job_positive_stage_field')
            self.wait.drop_down_selection()
            print('Job Positive Stage - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_positive_status_field(self, status):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_positive_status_xpath, status,
                                                 'job_positive_status_field')
            self.wait.drop_down_selection()
            print('Job Positive Status - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_negative_stage_field(self, stage):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_negative_stage_xpath, stage,
                                                 'job_negative_stage_field')
            self.wait.drop_down_selection()
            print('Job Negative Stage - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_negative_status_field(self, status):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_negative_status_xpath, status,
                                                 'job_negative_status_field')
            self.wait.drop_down_selection()
            print('Job Negative Status - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_ec_save(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_ec_save_xpath, 'job_ec_save')
            print('Job Eligibility Criteria - Saved')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_ec_notifier(self, message):
        try:
            time.sleep(0.4)
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_ec_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 9
0
class NewFeedbackConfigPage:
    __e_new_form_stage_xpath = Locators.PLACEHOLDER['text_ph'].format(
        'Interview Stages')
    __e_new_form_field_xpath = Locators.PLACEHOLDER['text_ph'].format(
        'Name like.')
    __e_new_form_search_css = Locators.BUTTONS['new_form_search']
    __e_new_use_form_xpath = Locators.BUTTONS['all_buttons'].format('Use')
    __e_new_for_edit_xpath = Locators.TITLE['title'].format(
        'Edit Confiiguration')
    __e_overall_mandatory_xpath = Locators.JOB['feedback_overall_mandatory']
    __e_reject_overall_xpath = Locators.JOB['reject_overall_mandatory']
    __e_update_form_xpath = Locators.BUTTONS['btnActionClicked'].format(
        "'", 'update', "'")

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)

    def stage_selection(self, stage):
        try:
            time.sleep(1.5)
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_new_form_stage_xpath,
                                                 stage,
                                                 'Send_Selection_Process')
            self.wait.drop_down_selection()
            print(f'selected - New - {stage}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def form_search_filed_enter(self, form):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_new_form_field_xpath,
                                                 form, 'form_search')
            print(f'Entered - New {form}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def form_search(self):
        try:
            self.wait.web_element_wait_click(By.CSS_SELECTOR,
                                             self.__e_new_form_search_css,
                                             'form_search')
            print('Feedback Form - Search')
            return True
        except Exception as error:
            ui_logger.error(error)

    def use_form(self):
        try:
            time.sleep(1)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_new_use_form_xpath,
                                             'use_form')
            print('Feedback Form - Use')
            return True
        except Exception as error:
            ui_logger.error(error)

    def edit_form(self):
        try:
            time.sleep(1)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_new_for_edit_xpath,
                                             'edit_form')
            print('Feedback Form - Edit')
            return True
        except Exception as error:
            ui_logger.error(error)

    def overall_mandatory(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_overall_mandatory_xpath,
                                             'overall_mandatory')
            print('Overall feedback mandatory - On')
            return True
        except Exception as error:
            ui_logger.error(error)

    def reject_overall_mandatory(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_reject_overall_xpath,
                                             'reject_overall_mandatory')
            print('Reject Overall feedback mandatory - On')
            return True
        except Exception as error:
            ui_logger.error(error)

    def update_feedback_form(self):
        try:
            time.sleep(0.5)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_update_form_xpath,
                                             'update_feedback_form')
            print('Feedback Form - Save')
            time.sleep(0.5)
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_new_form_notifier(self, message):
        try:
            time.sleep(0.4)
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_new_form_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            time.sleep(0.5)
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 10
0
class CandidateQueryPage:
    __e_more_queries_xpath = Locators.QUERY['more_queries']
    __e_category_xpath = Locators.QUERY['category_select']
    __e_subject_name = Locators.QUERY['subject_field']
    __e_message_xpath = Locators.QUERY['message_field']
    __e_raise_button_xpath = Locators.BUTTONS['button'].format('Raise Query')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)

    def more_queries_button(self):
        try:
            time.sleep(1)
            self.wait.web_element_wait_click(By.XPATH, self.__e_more_queries_xpath, 'more_queries')
            print('Clicked - on More queries button')
            return True
        except Exception as error:
            ui_logger.error(error)

    def category_select(self, category):
        try:
            time.sleep(1)
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_category_xpath, category,
                                                 'category_select')
            print('category_select - Selected')
            return True
        except Exception as error:
            ui_logger.error(error)

    def subject_entry(self, subject):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_subject_name, subject,
                                                 'subject_entry')
            print('subject_entry - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def message_entry(self, message):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_message_xpath, message,
                                                 'message_entry')
            print('message_entry - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def query_raise_button(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_raise_button_xpath, 'query_raise_button')
            print('query_raise_button - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def query_raise_notifier(self, message):
        try:
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def query_raise_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 11
0
class RequirementCreationPage:
    """
    ----------------- WEB ELEMENT REFERENCE CLASS PRIVATE VARIABLES TO EASY ACCESS ------>>>>
    """
    __e_create = Locators.BUTTONS['create']
    __e_req_name_xpath = Locators.PLACEHOLDER['place_holder'].format('Name')
    __e_req_job_xpath = Locators.TITLE['title'].format('Job Roles')
    __e_req_track_xpath = Locators.PLACEHOLDER['text_ph'].format('Hiring Type')
    __e_req_type_xpath = Locators.PLACEHOLDER['text_ph'].format('College Type')
    __e_req_create_xpath = Locators.BUTTONS['actionClicked'].format("'", 'create', "'")

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)

    def create_button(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_create, 'Job Create Button')
            print('***--------->>> Clicked on job created button')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def requirement_name(self, name):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_req_name_xpath, name, 'requirement_name')
            print(f'Requirement name entered - {name}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def requirement_job(self):
        try:
            time.sleep(2)
            self.wait.web_element_wait_click(By.XPATH, self.__e_req_job_xpath, 'requirement_job')
            time.sleep(0.5)
            return True
        except Exception as error:
            ui_logger.error(error)

    def requirement_hiring(self, track):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_req_track_xpath, track,
                                                 'requirement_hiring')
            self.wait.drop_down_selection()
            print(f'Requirement hiring track - {track}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def requirement_type(self, college_type):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_req_type_xpath, college_type,
                                                 'requirement_type')
            self.wait.drop_down_selection()
            print(f'Requirement college type - {college_type}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def requirement_create(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_req_create_xpath, 'req_create_button')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def req_creation_notifier(self, message):
        try:
            time.sleep(0.4)
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def req_creation_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            time.sleep(0.5)
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 12
0
class JobAutomations:

    __e_registration_stage_xpath = Locators.JOB['registration_hop']
    __e_eligibility_stage_xpath = Locators.JOB['eligibility_hop']
    __e_offer_stage_xpath = Locators.JOB['offer_stage']
    __e_hopping_stage_xpath = Locators.JOB['hop_stage_field']
    __e_hopping_status_xpath = Locators.JOB['hop_status_field']
    __e_toggle_buttons_css = Locators.JOB['toggle_buttons']
    __e_save_xpath = Locators.BUTTONS['button'].format('Save')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.scroll = PageScroll(self.driver)
        self.notifier = Notifier(self.driver)

    def registration_stage(self):
        try:
            time.sleep(0.6)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_registration_stage_xpath,
                                             'registration_stage')
            print('Clicked - On registration stage')
            return True
        except Exception as error:
            ui_logger.error(error)

    def eligibility_stage(self):
        try:
            time.sleep(0.6)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_eligibility_stage_xpath,
                                             'eligibility_stage')
            print('Clicked - On eligibility stage')
            return True
        except Exception as error:
            ui_logger.error(error)

    def offer_stage(self):
        try:
            time.sleep(0.6)
            self.scroll.down(0, -300)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_offer_stage_xpath,
                                             'offer_stage')
            print('Clicked - On offer stage')
            return True
        except Exception as error:
            ui_logger.error(error)

    def hop_stage(self, stage):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_hopping_stage_xpath,
                                                 stage, 'hop_stage')
            print('Select - Hopping stage')
            return True
        except Exception as error:
            ui_logger.error(error)

    def hop_status(self, status):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_hopping_status_xpath,
                                                 status, 'hop_status')
            print('Select - Hopping status')
            return True
        except Exception as error:
            ui_logger.error(error)

    def all_round_button_on(self):
        try:
            time.sleep(0.5)
            self.scroll.up(0, 100)
            self.wait.web_elements_wait_multiple_click(
                By.CSS_SELECTOR, self.__e_toggle_buttons_css, '')
            print('Auto Tag to test - ON')
            print('Eligibility Criteria - ON')
            print('Self Schedule - ON')
            return True
        except Exception as error:
            ui_logger.error(error)

    def automation_save(self):
        try:
            time.sleep(0.5)
            self.scroll.down(0, -300)
            self.wait.web_element_wait_click(By.XPATH, self.__e_save_xpath,
                                             'automation_save')
            print('Job Automation Configuration - Save')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_automation_save_notifier(self, message):
        try:
            time.sleep(0.7)
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_automations_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 13
0
class EventMangeInterviewersPage:
    __e_add_criteria_xpath = Locators.BUTTONS['add_criteria']
    __e_panel_entry_xpath = Locators.NOMINATIONS['panel_1']
    __e_panel2_entry_xpath = Locators.NOMINATIONS['panel_2']
    __e_skill1_search_xpath = Locators.BUTTONS['nomination_int_search']
    __e_skill2_search_xpath = Locators.NOMINATIONS['search']
    __e_skill1_required_int_xpath = Locators.NOMINATIONS['skill1_int']
    __e_skill2_required_int_xpath = Locators.NOMINATIONS['skill2_int']
    __e_skill1_required_nom_xpath = Locators.NOMINATIONS['skill1_nom']
    __e_skill2_required_nom_xpath = Locators.NOMINATIONS['skill2_nom']
    __e_send_mail_xpath = Locators.BUTTONS['nomination_mail']
    __e_confirm_button_xpath = Locators.BUTTONS['all_buttons'].format('OK')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.scroll = PageScroll(self.driver)
        self.notifier = Notifier(self.driver)

    def add_criteria(self):
        try:
            time.sleep(1.5)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_add_criteria_xpath,
                                             'add_criteria')
            print('Add new criteria - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def panel_skill1_select(self, panel):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_panel_entry_xpath,
                                                 panel, 'panel_skill1_select')
            self.wait.drop_down_selection()
            print('Skill-1 to panel - Selected')
            return True
        except Exception as error:
            ui_logger.error(error)

    def panel_skill2_select(self, panel):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_panel2_entry_xpath,
                                                 panel, 'panel_skill2_select')
            self.wait.drop_down_selection()
            print('Skill-2 to panel - Selected')
            return True
        except Exception as error:
            ui_logger.error(error)

    def search_skill1_interviewers(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_skill1_search_xpath,
                                             'search_skill1_interviewers')
            print('Skill-1 interviewers - Searched')
            return True
        except Exception as error:
            ui_logger.error(error)

    def search_skill2_interviewers(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_skill2_search_xpath,
                                             'search_skill2_interviewers')
            print('Skill-2 interviewers - Searched')
            return True
        except Exception as error:
            ui_logger.error(error)

    def skill1_required_interviewers(self, count):
        try:
            self.wait.clear(By.XPATH, self.__e_skill1_required_int_xpath,
                            'skill1_required_int')
            self.wait.web_element_wait_send_keys(
                By.XPATH, self.__e_skill1_required_int_xpath, count,
                'search_skill2_interviewers')
            print('Skill-1 interviewers count - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def skill2_required_interviewers(self, count):
        try:
            self.wait.clear(By.XPATH, self.__e_skill2_required_int_xpath,
                            'skill2_required_int')
            self.wait.web_element_wait_send_keys(
                By.XPATH, self.__e_skill2_required_int_xpath, count,
                'search_skill2_interviewers')
            print('Skill-2 interviewers count - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def skill1_required_nomination(self, count):
        try:
            self.wait.clear(By.XPATH, self.__e_skill1_required_nom_xpath,
                            'skill1_required_nomination')
            self.wait.web_element_wait_send_keys(
                By.XPATH, self.__e_skill1_required_nom_xpath, count,
                'search_skill2_interviewers')
            print('Skill-1 nominations count - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def skill2_required_nomination(self, count):
        try:
            self.wait.clear(By.XPATH, self.__e_skill2_required_nom_xpath,
                            'skill2_required_nomination')
            self.wait.web_element_wait_send_keys(
                By.XPATH, self.__e_skill2_required_nom_xpath, count,
                'search_skill2_interviewers')
            print('Skill-2 nominations count - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def send_mail_interviewers(self):
        try:
            time.sleep(1)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_send_mail_xpath,
                                             'send_mail_interviewers')
            print('Send mail to interviewers - Sent')
            return True
        except Exception as error:
            ui_logger.error(error)

    def confirm_button(self):
        try:
            time.sleep(1)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_confirm_button_xpath,
                                             'send_mail_interviewers')
            print('Ok confirmation - Confirmed')
            return True
        except Exception as error:
            ui_logger.error(error)

    def criteria_notifier(self, message):
        try:
            self.wait.loading()
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def criteria_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            self.wait.loading()
            self.scroll.up(0, 70)
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 14
0
class CancelInterview:

    __e_select_reason_xpath = Locators.PLACEHOLDER['place_holder'].format('Reason')
    __e_reason_comment_xpath = Locators.PLACEHOLDER['all_place_holder'].format('Please provide the '
                                                                               'reason for cancellation')
    __e_save_reason_xpath = Locators.BUTTONS['button'].format('Save')
    __e_confirm_button_xpath = Locators.BUTTONS['button'].format('Confirm')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)

    def cancel_interview_request_reason(self, reason):
        try:
            time.sleep(1.5)
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_select_reason_xpath, reason,
                                                 'cancel_interview_request')
            self.wait.drop_down_selection()
            print(f'Reason selected - {reason}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def cancel_interview_request_comment(self, comment):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_reason_comment_xpath, comment,
                                                 'cancel_interview_request')
            print('Enter the comment for cancel request')
            return True
        except Exception as error:
            ui_logger.error(error)

    def cancel_interview_request_save(self):
        try:
            time.sleep(2)
            self.wait.web_element_wait_click(By.XPATH, self.__e_save_reason_xpath, 'cancel_interview_request_save')
            print('Cancel Request - Save')
            return True
        except Exception as error:
            ui_logger.error(error)

    def cancel_interview_request_confirm(self):
        try:
            time.sleep(5)
            self.wait.web_element_wait_click(By.XPATH, self.__e_confirm_button_xpath,
                                             'cancel_interview_request_confirm')
            print('Cancel Interview - Confirm')
            return True
        except Exception as error:
            ui_logger.error(error)

    def change_status_notifier(self, message):
        try:
            time.sleep(1)
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def change_status_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            self.wait.loading()
            time.sleep(0.5)
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 15
0
class LobbyPage:
    __e_create_button_xpath = Locators.BUTTONS['button'].format('Create Room')
    __e_room_name_xpath = Locators.PLACEHOLDER['text_ph'].format('Room Name')
    __e_interviewers_xpath = Locators.TITLE['title'].format(
        'Select Interviewers')
    __e_participants_xpath = Locators.TITLE['title'].format(
        'Select Participants')
    __e_search_xpath = Locators.TITLE['title'].format('Type here to search')
    __e_select_all_xpath = Locators.MULTI_SELECTIONS['moveAllItemsRight']
    __e_done_button = Locators.BUTTONS['all_buttons'].format('Done')
    __e_created_room_xpath = Locators.BUTTONS['actionClicked'].format(
        "'", 'createRoom', "'")
    __e_active_room_xpath = Locators.EVENT_LOBBY['active']
    __e_ok_button_xpath = Locators.BUTTONS['all_buttons'].format('OK')
    __e_un_assign_xpath = Locators.EVENT_LOBBY['un_assign']
    __e_assign_room_xpath = Locators.EVENT_LOBBY['assign_room']
    __e_room_name_field_xpath = Locators.PLACEHOLDER['text_ph'].format(
        'Room Name')
    __e_room_search_filed_xpath = Locators.TITLE['title'].format('Select Room')
    __e_search_button_xpath = Locators.BUTTONS['button'].format('Search')
    __e_room_search_class = Locators.EVENT_LOBBY['room_search']
    __e_assigning_room_xpath = Locators.BUTTONS['actionClicked'].format(
        "'", 'assignCandidateToRoom', "'")
    __e_candidate_info_xpath = Locators.TITLE['title'].format(
        'View Candidate Info')

    def __init__(self, driver):
        self.driver = driver

        self.wait = WebElementWait(self.driver)
        self.scroll = PageScroll(self.driver)
        self.message = Notifier(self.driver)
        self.sub_tab = EventSubTabs(self.driver)

    def create_room_button(self):
        try:
            self.scroll.up(0, 100)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_create_button_xpath,
                                             'room_create_button')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def room_name(self, room_name):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_room_name_xpath,
                                                 room_name, 'room_name_field')
            return True
        except Exception as error:
            ui_logger.error(error)

    def select_interviewers(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_interviewers_xpath,
                                             'Interviewers_field')
            return True
        except Exception as error:
            ui_logger.error(error)

    def select_participants(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_participants_xpath,
                                             'Participants_field')
            return True
        except Exception as error:
            ui_logger.error(error)

    def search(self, key):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_search_xpath, key,
                                                 'Search_field')
            return True
        except Exception as error:
            ui_logger.error(error)

    def move_all(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_select_all_xpath,
                                             'Move_all_items')
            return True
        except Exception as error:
            ui_logger.error(error)

    def done(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_done_button,
                                             'Done_button')
            return True
        except Exception as error:
            ui_logger.error(error)

    def created_button(self, message):
        try:
            time.sleep(1)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_created_room_xpath,
                                             'room_created_button')
            self.wait.loading()
            self.message.glowing_messages(message)
            self.message.dismiss_message()
            return True
        except Exception as error:
            ui_logger.error(error)

    def active_room(self):
        try:
            time.sleep(0.5)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_active_room_xpath,
                                             'room_created_button')
            return True
        except Exception as error:
            ui_logger.error(error)

    def ok_button(self, message):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_ok_button_xpath,
                                             'room_created_button')
            time.sleep(0.5)
            self.message.glowing_messages(message)
            self.message.dismiss_message()
            return True
        except Exception as error:
            ui_logger.error(error)

    def un_assign_room(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_un_assign_xpath,
                                             'Un_assign_from_room')
            return True
        except Exception as error:
            ui_logger.error(error)

    def ok_buttons(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_ok_button_xpath,
                                             'un_assign_ok_buttons')
            time.sleep(1)
            return True
        except Exception as error:
            ui_logger.error(error)

    def assign_room_action(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_assign_room_xpath,
                                             'assign_room_action')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def room_name_field(self, room_name):
        try:
            self.wait.web_element_wait_send_keys(
                By.XPATH, self.__e_room_name_field_xpath, room_name,
                'room_name_field')
            self.wait.drop_down_selection()
            return True
        except Exception as error:
            ui_logger.error(error)

    def room_assigning_action(self):
        try:
            time.sleep(1)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_assigning_room_xpath,
                                             'room_assign')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def room_search_filed(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_room_search_filed_xpath,
                                             'room_search_filed')
            return True
        except Exception as error:
            ui_logger.error(error)

    def search_button(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_search_button_xpath,
                                             'search_button')
            return True
        except Exception as error:
            ui_logger.error(error)

    def no_candidate_message(self, message):
        try:
            time.sleep(1)
            self.wait.web_element_wait_text(By.CLASS_NAME,
                                            self.__e_room_search_class,
                                            'tag_room_search_candidate')
            if self.wait.text_value.strip() == message:
                print(
                    f'No candidate tagged to room message - {self.wait.text_value}'
                )
                self.driver.refresh()
                self.wait.loading()
                return True
        except Exception as error:
            ui_logger.error(error)

    def candidate_info(self, candidate_name):
        try:
            self.wait.web_element_wait_text(By.XPATH,
                                            self.__e_candidate_info_xpath,
                                            'candidate_info')
            if self.wait.text_value == candidate_name:
                print(f'Candidate name - {self.wait.text_value}')
                return True
        except Exception as error:
            ui_logger.error(error)
class InterviewFeedback:

    __e_provide_select_drop_css = Locators.FEEDBACK['new_form_drop_down']
    __e_provide_comment_xpath = Locators.PLACEHOLDER['all_place_holder'].format('Enter text here')
    __e_provide_overall_xpath = Locators.FEEDBACK['overall']
    __e_decision_button_xpath = Locators.BUTTONS['all_buttons']
    __e_feedback_submit_xpath = Locators.BUTTONS['button'].format('Submit Feedback')
    __e_agree_xpath = Locators.BUTTONS['button'].format('Agree and Submit')
    __e_save_draft_xpath = Locators.BUTTONS['button'].format('Save as Draft')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)

    def feedback_select_drop_down(self, value):
        try:
            time.sleep(5)
            self.wait.loading()
            self.wait.web_elements_wait_send_keys(By.XPATH, self.__e_provide_select_drop_css, value)
            print(f'Selected Rating - {value}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def feedback_comments(self, comment):
        try:
            time.sleep(0.5)
            self.wait.web_elements_wait_send_keys(By.XPATH, self.__e_provide_comment_xpath, comment)
            print(f'Given Comment - {comment}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def feedback_decision(self, decision):
        try:
            self.wait.web_elements_wait_click(By.XPATH, self.__e_decision_button_xpath.format(decision), decision)
            print(f'Selected Decision - {decision}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def overall_comment(self, comment):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_provide_overall_xpath, comment, 'overall_comment')
            print(f'Given Overall Comment - {comment}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def save_draft_new_feedback(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_save_draft_xpath, 'submit_feedback_button')
            print('Save Draft - Submitted')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def submit_feedback(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_feedback_submit_xpath, 'submit_feedback_button')
            print('Feedback - Submitted')
            return True
        except Exception as error:
            ui_logger.error(error)

    def agree_and_submit(self):
        try:
            time.sleep(0.7)
            self.wait.web_element_wait_click(By.XPATH, self.__e_agree_xpath, 'feedback_form_validation')
            print('Agree and submit - Submitted')
            time.sleep(1)
            return True
        except Exception as error:
            ui_logger.error(error)

    def save_draft_notifier(self, message):
        try:
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def save_draft_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 17
0
class EventNominationsPage:
    __e_nomination_tab_xpath = Locators.SUB_MENU['nominations']
    __e_header_tag = Locators.TAG['h5']
    __e_panel_xpath = Locators.NOMINATIONS['panel_select']
    __e_check_xpath = Locators.CHECK_BOX['check_box']
    __e_action_class = Locators.NOMINATIONS['actions']
    __e_approve_xpath = Locators.NOMINATIONS['approve']
    __e_sync_xpath = Locators.TITLE['title'].format(
        'This will sync interviewers for whom you'
        ' have accepted nomination with the event owners')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.scroll = PageScroll(self.driver)
        self.notifier = Notifier(self.driver)

    def nomination_tab(self):
        try:
            self.wait.loading()
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_nomination_tab_xpath,
                                             'nomination_tab')
            print('Interviewers nomination_tab - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def header_check(self, header):
        try:
            self.wait.loading()
            assert self.wait.web_elements_wait_text(By.TAG_NAME, self.__e_header_tag, header) == header, \
                'no header found'
            return True
        except Exception as error:
            ui_logger.error(error)

    def panel_select(self, skill):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_panel_xpath, skill,
                                                 'panel_select')
            self.wait.loading()
            print(f'{skill} - skill selected to panel')
            return True
        except Exception as error:
            ui_logger.error(error)

    def select_applicants(self):
        try:
            time.sleep(1)
            self.wait.web_element_wait_click(By.XPATH, self.__e_check_xpath,
                                             'select_applicants')
            print('select_applicants - Selected')
            return True
        except Exception as error:
            ui_logger.error(error)

    def recruiter_actions(self):
        try:
            self.wait.web_element_wait_click(By.CLASS_NAME,
                                             self.__e_action_class,
                                             'recruiter_actions')
            print('recruiter_actions - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def approve_by_recruiter(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_approve_xpath,
                                             'recruiter_actions')
            self.wait.loading()
            print('recruiter_actions - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def sync_interviewers(self):
        try:
            self.scroll.up(0, 90)
            time.sleep(1.5)
            self.wait.web_element_wait_click(By.XPATH, self.__e_sync_xpath,
                                             'sync_interviewers')
            print('sync_interviewers - Synced')
            return True
        except Exception as error:
            ui_logger.error(error)

    def sync_notifier(self, message):
        try:
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def sync_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 18
0
class LiveIntSchedulePage:
    __e_live_stage_xpath = Locators.LIVE_INTERVIEW['stage_selection']
    __e_live_app_xpath = Locators.PLACEHOLDER['text_ph'].format(
        'Candidate Name')
    __e_live_search_app_xpath = Locators.LIVE_INTERVIEW['app_search']
    __e_live_clear_search_app_xpath = Locators.LIVE_INTERVIEW['clear_search']
    __e_check_xpath = Locators.CHECKBOX['type']
    __e_validate_class = Locators.LIVE_INTERVIEW['int_screen']
    __e_select_int_xpath = Locators.LIVE_INTERVIEW['select_int']
    __e_live_schedule_select_xpath = Locators.BUTTONS['button'].format(
        'Schedule Selected')
    __e_live_schedule_xpath = Locators.BUTTONS['button'].format(' Schedule')
    __e_arrow_down_class = Locators.LIVE_INTERVIEW['arrow_down']
    __e_feedback_action_xpath = Locators.LIVE_INTERVIEW['feedback_button']

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)
        self.switch_window = SwitchWindowClose(self.driver)

    def stage_selection(self, stage_name):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_live_stage_xpath,
                                                 stage_name, 'job_int_panel')
            print(f'{stage_name} - Selected from available stages')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def applicant_name_filed(self, applicant_name):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_live_app_xpath,
                                                 applicant_name,
                                                 'applicant_name_filed')
            print(f'Applicant name {applicant_name} - Entered')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def schedule_applicant_search(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_live_search_app_xpath,
                                             'schedule_applicant_search')
            print('schedule applicant - searched')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def clear_applicant_search(self):
        try:
            time.sleep(0.7)
            self.wait.web_element_wait_click(
                By.XPATH, self.__e_live_clear_search_app_xpath,
                'clear_applicant_search')
            print('clear applicant - searched')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def select_live_applicant(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_check_xpath,
                                             'Applicant_check_box')
            print('Applicant got - selected')
            return True
        except Exception as error:
            ui_logger.error(error)

    def schedule_select(self):
        try:
            time.sleep(2)
            self.wait.web_element_wait_click(
                By.XPATH, self.__e_live_schedule_select_xpath,
                'schedule_select')
            self.wait.loading()
            print('schedule_select button - selected')
            return True
        except Exception as error:
            ui_logger.error(error)

    def validate_interviewers_screen(self, screen_name):
        try:
            time.sleep(0.5)
            self.wait.web_element_wait_text(By.CLASS_NAME,
                                            self.__e_validate_class,
                                            'validate_interviewers_screen')
            if screen_name in self.wait.text_value.strip():
                print(f'Screen name {screen_name} - validating')
                return True
        except Exception as error:
            ui_logger.error(error)

    def select_interviewers(self):
        try:
            time.sleep(1)
            self.wait.web_elements_wait_click(By.XPATH,
                                              self.__e_select_int_xpath, '')
            print('select_interviewers - selected')
            return True
        except Exception as error:
            ui_logger.error(error)

    def live_schedule(self):
        try:
            time.sleep(0.5)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_live_schedule_xpath,
                                             'live_schedule')
            self.wait.loading()
            print('Live schedule - selected')
            return True
        except Exception as error:
            ui_logger.error(error)

    def live_schedule_notifier(self, message):
        try:
            time.sleep(0.7)
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def live_schedule_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            time.sleep(0.9)
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def arrow_down_for_feedback(self):
        try:
            time.sleep(0.5)
            self.wait.web_element_wait_click(By.CLASS_NAME,
                                             self.__e_arrow_down_class,
                                             'arrow_down_for_feedback')
            self.wait.loading()
            print('Arrow down for feedback- Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def feedback_provide_action(self):
        try:
            time.sleep(1)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_feedback_action_xpath,
                                             'feedback_provide_action')
            print('Provide feedback Action - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 19
0
class EventCancelRequest:
    __e_approve_xpath = Locators.TITLE['title'].format('Approve Request')
    __e_approve_tool_xpath = Locators.TITLE['tooltip'].format(
        "'", 'Approve Request', "'")
    __e_comment_xpath = Locators.EVENT['comment_cancel_request']
    __e_confirm_xpath = Locators.BUTTONS['all_buttons'].format('OK')
    __e_ahead_xpath = Locators.BUTTONS['all_buttons'].format('GO AHED')
    __e_notifier = Locators.NOTIFIER['message']

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)
        self.for_back = ForwardBackward(self.driver)
        self.scroll = PageScroll(self.driver)

    def accept_cancellation(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_approve_xpath,
                                             'accept_cancellation')
            print('Approved - Cancel request from interviewer')
            return True
        except Exception as error:
            ui_logger.error(error)

    def cancel_request_comment(self, comment):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_comment_xpath,
                                                 comment,
                                                 'cancel_request_comment')
            print(f'Entered - {comment}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def confirm_request(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_confirm_xpath,
                                             'confirm_request')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def go_ahead_with_lobby_screen(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_ahead_xpath,
                                             'go_ahead_with_lobby_screen')
            print('Continue with Lobby -Screen')
            return True
        except Exception as error:
            ui_logger.error(error)

    def lobby_confirm_request(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_confirm_xpath,
                                             'go_ahead_with_lobby_screen')
            print('Confirm Lobby - Cancel request by administrator')
            return True
        except Exception as error:
            ui_logger.error(error)

    def lobby_accept_cancellation(self):
        try:
            self.scroll.up(0, -50)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_approve_tool_xpath,
                                             'accept_cancellation')
            print('Approved - Cancel request from interviewer')
            return True
        except Exception as error:
            ui_logger.error(error)

    def acceptance_notifier(self, message):
        try:
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def acceptance_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            time.sleep(1)
            self.for_back.browser_backward()
            self.wait.loading()
            time.sleep(0.5)
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 20
0
class QuickIntSchedulePage:
    __e_live_stage_xpath = Locators.LIVE_INTERVIEW['stage_selection']
    __e_interviewer_select_xpath = Locators.TITLE['title'].format(
        'Interviewers')
    __e_interview_round_xpath = Locators.PLACEHOLDER['text_ph'].format(
        'Select Interview Round')
    __e_comment_xpath = Locators.PLACEHOLDER['all_place_holder'].format(
        'Your Comments')
    __e_schedule_xpath = Locators.BUTTONS['actionClicked'].format(
        "'", 'scheduleInterview', "'")

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)

    def select_interviewers_field(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_interviewer_select_xpath,
                                             'select_interviewers')
            print('Select interviewers - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def select_interviewer_round(self, stage_name):
        try:
            self.wait.web_element_wait_send_keys(
                By.XPATH, self.__e_interview_round_xpath, stage_name,
                'select_interviewers')
            self.wait.drop_down_selection()
            print(f'Select stage {stage_name} - Selected')
            return True
        except Exception as error:
            ui_logger.error(error)

    def quick_comment(self, comment):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_comment_xpath,
                                                 comment, 'quick_comment')
            self.wait.drop_down_selection()
            print(f'Quick interview {comment} - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def schedule_quick_interview(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_schedule_xpath,
                                             'Quick_schedule_interview')
            print('Quick interview - Scheduled')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def quick_schedule_notifier(self, message):
        try:
            time.sleep(0.5)
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def quick_schedule_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            time.sleep(0.9)
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)
class RequirementHelpDeskConfig:

    __e_default_category_xpath = Locators.TITLE['title'].format(
        'Query Category')
    __e_job_category_xpath = Locators.HELPDESK['job_category']
    __e_event_category_xpath = Locators.HELPDESK['event_category']
    __e_user_xpath = Locators.TITLE['title'].format('Users')
    __e_job_user_xpath = Locators.HELPDESK['job_user']
    __e_event_user_xpath = Locators.HELPDESK['event_user']
    __e_sla_xpath = Locators.PLACEHOLDER['num']
    __e_jobs_xpath = Locators.TITLE['title'].format('Jobs')
    __e_event_job_xpath = Locators.HELPDESK['event_job']
    __e_job_sla_xpath = Locators.HELPDESK['job_sla']
    __e_event_xpath = Locators.TITLE['title'].format('Events')
    __e_event_sla_xpath = Locators.HELPDESK['event_sla']
    __e_save_button_xpath = Locators.BUTTONS['button'].format('Save')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.scroll = PageScroll(self.driver)
        self.notifier = Notifier(self.driver)

    def default_category(self):
        try:
            self.wait.loading()
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_default_category_xpath,
                                             'default_category')
            print('default_category - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_category(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_job_category_xpath,
                                             'job_category')
            print('job_category - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_category(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_event_category_xpath,
                                             'event_category')
            print('event_category - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def category_user_selection(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_user_xpath,
                                             'category_user_selection')
            print('category_user_selection - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_user_selection(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_job_user_xpath,
                                             'job_user_selection')
            print('job_user_selection - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_user_selection(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_event_user_xpath,
                                             'event_user_selection')
            print('event_user_selection - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def category_sla_hour_selection(self, hours):
        try:
            self.wait.web_element_wait_send_keys(
                By.XPATH, self.__e_sla_xpath, hours,
                'category_sla_hour_selection')
            print('category_sla_hour_selection - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_sla_hour_selection(self, hours):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_job_sla_xpath, hours,
                                                 'job_sla_hour_selection')
            print('job_sla_hour_selection - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_sla_hour_selection(self, hours):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_event_sla_xpath,
                                                 hours,
                                                 'event_sla_hour_selection')
            print('event_sla_hour_selection - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def category_job_selection(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_jobs_xpath,
                                             'category_job_selection')
            print('category_job_selection - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_job_selection(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_event_job_xpath,
                                             'event_job_selection')
            print('event_job_selection - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def category_event_selection(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_event_xpath,
                                             'category_event_selection')
            print('category_event_selection - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def save_help_desk_config(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_save_button_xpath,
                                             'save_help_desk_config')
            print('save_help_desk_config - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def config_notifier(self, message):
        try:
            time.sleep(0.7)
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def config_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            time.sleep(0.9)
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 22
0
class JobCreationPage:
    """
    ----------------- WEB ELEMENT REFERENCE CLASS PRIVATE VARIABLES TO EASY ACCESS ------>>>>
    """
    __e_create = Locators.BUTTONS['create']
    __e_job_names = Locators.JOB['job_name']
    __e_anchor_tag = Locators.TAG['anchor']
    __e_file_path = Locators.ATTACHMENT['file']
    __e_description = Locators.JOB['description']
    __e_location = Locators.PLACEHOLDER['text_ph'].format('Location')
    __e_hm = Locators.PLACEHOLDER['text_ph'].format('Hiring Manager')
    __e_bu = Locators.PLACEHOLDER['text_ph'].format('Business Unit')
    __e_openings = Locators.JOB['openings']
    __e_male = Locators.PLACEHOLDER['num_ph'].format('Male')
    __e_female = Locators.PLACEHOLDER['num_ph'].format('Female')
    __e_job_create = Locators.BUTTONS['button'].format('Create')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)

    def create_button(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_create, 'Job Create Button')
            print('***--------->>> Clicked on job created button')
            self.wait.loading()
            return True

        except Exception as error:
            ui_logger.error(error)

    def job_name(self, name):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_job_names, name, 'Job_name_field')
            return True

        except Exception as error:
            ui_logger.error(error)

    def job_attachment(self, file_path):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_file_path, file_path, 'Job_attachment')
            time.sleep(0.5)
            self.wait.uploading()
            return True

        except Exception as error:
            ui_logger.error(error)

    def job_attachment_notifier(self, message):
        try:
            self.notifier.glowing_messages(message)
            self.notifier.dismiss_message()
            return True

        except Exception as error:
            ui_logger.error(error)

    def job_description(self, description):
        self.wait.web_element_wait_send_keys(By.XPATH, self.__e_description, description, 'Job_description')
        self.wait.drop_down_selection()
        return True

    def job_location(self, location):
        self.wait.web_element_wait_send_keys(By.XPATH, self.__e_location, location, 'Job_location_field')
        self.wait.drop_down_selection()
        return True

    def job_hiring_manager(self, hm):
        self.wait.web_element_wait_send_keys(By.XPATH, self.__e_hm, hm, 'job_hm_field')
        self.wait.drop_down_selection()
        return True

    def job_business_unit(self, bu):
        self.wait.web_element_wait_send_keys(By.XPATH, self.__e_bu, bu, 'Job_bu_field')
        self.wait.drop_down_selection()
        return True

    def job_openings(self, openings):
        self.wait.clear(By.NAME, self.__e_openings, 'Job_openings_field')
        self.wait.web_element_wait_send_keys(By.NAME, self.__e_openings, openings, 'Job_openings_field')
        return True

    def job_male_diversity(self, male_diversity):
        self.wait.clear(By.XPATH, self.__e_male, 'Job_male_field')
        self.wait.web_element_wait_send_keys(By.XPATH, self.__e_male, male_diversity, 'Job_male_field')
        return True

    def job_female_diversity(self, female_diversity):
        self.wait.clear(By.XPATH, self.__e_female, 'Job_female_field')
        self.wait.web_element_wait_send_keys(By.XPATH, self.__e_female, female_diversity, 'Job_female_field')
        return True

    def job_create(self):
        self.wait.web_element_wait_click(By.XPATH, self.__e_job_create, 'Job_create_button')
        self.wait.loading()
        return True

    def job_create_notifier(self, message):
        try:
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_create_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            self.wait.loading()
            time.sleep(0.2)
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 23
0
class UnlockFeedback:

    __e_select_int_xpath = Locators.CHECKBOX['all']
    __e_unlock_btn_xpath = Locators.BUTTONS['actionClicked'].format(
        "'", 'unlockFeedback', "'")
    __e_unlock_comment_xpath = Locators.EVENT['comment_cancel_request']
    __e_ok_button_xpath = Locators.BUTTONS['all_buttons'].format('OK')
    __e_close_button_xpath = Locators.BUTTONS['button'].format('Close')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)
        self.scroll = PageScroll(self.driver)

    def select_all_interviewers(self):
        try:
            time.sleep(1)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_select_int_xpath,
                                             'select_all_interviewers')
            print('Selection Interviewer for - Unlock')
            return True
        except Exception as error:
            ui_logger.error(error)

    def unlock_button(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_unlock_btn_xpath,
                                             'unlock_button')
            print('Unlocking button - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def unlock_request_comment(self, comment):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_unlock_comment_xpath,
                                                 comment,
                                                 'unlock_request_comment')
            print('Enter the comment for Unlock request')
            return True
        except Exception as error:
            ui_logger.error(error)

    def ok_button(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_ok_button_xpath,
                                             'ok_button')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def close_button(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_close_button_xpath,
                                             'close_button')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def unlock_status_notifier(self, message):
        try:
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def unlock_status_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            time.sleep(0.5)
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 24
0
class TagInterviewersPage:
    __e_job_interviewers_xpath = Locators.JOB['int_panel']
    __e_job_int_add_class = Locators.JOB['panel_int_add']
    __e_job_int_save_xpath = Locators.BUTTONS['button'].format('Save')
    __e_job_tag_total_int_css = Locators.JOB['total_owners']

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)

    def job_int_panel(self, value):
        try:
            self.wait.web_element_wait_send_keys(
                By.XPATH, self.__e_job_interviewers_xpath, value,
                'job_int_panel')
            print(f'{value} - Selected from job interviewers panel')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_int_add(self):
        try:
            time.sleep(0.5)
            self.wait.web_element_wait_click(By.CLASS_NAME,
                                             self.__e_job_int_add_class,
                                             'job_int_add')
            print('saved - selection process')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_int_save(self):
        try:
            time.sleep(0.5)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_job_int_save_xpath,
                                             'job_int_save')
            print('saved - job interviewers')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_tag_int_notifier(self, message):
        try:
            time.sleep(0.7)
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_tag_int_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            return True
        except Exception as error:
            ui_logger.error(error)

    def total_tag_interviewers(self, number_of_tag_ints):
        try:
            self.wait.loading()
            self.wait.web_element_wait_text(By.CSS_SELECTOR,
                                            self.__e_job_tag_total_int_css,
                                            'total_tag_interviewers')
            if str(number_of_tag_ints) in self.wait.text_value:
                print(f'Total tagged Interviewers - {number_of_tag_ints}')
                return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 25
0
class ChangeStatus:

    __e_stage_field_xpath = Locators.CHANGE_STATUS['stage']
    __e_status_field_xpath = Locators.CHANGE_STATUS['status']
    __e_comment_xpath = Locators.CHANGE_STATUS['comment']
    __e_button_xpath = Locators.BUTTONS['button'].format('Change')
    __e_select_int_xpath = Locators.TITLE['title'].format(
        'Select Interviewers')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)

    def applicant_stage(self, stage):
        try:
            time.sleep(2)
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_stage_field_xpath,
                                                 stage,
                                                 'Applicant_stage_field')
            return True
        except Exception as error:
            ui_logger.error(error)

    def applicant_status(self, status):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_status_field_xpath,
                                                 status,
                                                 'Applicant_status_field')
            return True
        except Exception as error:
            ui_logger.error(error)

    def select_interviewers(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_select_int_xpath,
                                             'select_interviewers')
            print('Select Interviewers - Selected')
            time.sleep(2)
            return True
        except Exception as error:
            ui_logger.error(error)

    def comment(self, comment):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_comment_xpath,
                                                 comment,
                                                 'Applicant_comment_box')
            return True
        except Exception as error:
            ui_logger.error(error)

    def change_button(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_button_xpath,
                                             'Change_Button')
            print('MassInterview applicant status - Changed')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def change_status_notifier(self, message):
        try:
            time.sleep(1)
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def change_status_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            self.wait.loading()
            time.sleep(0.5)
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 26
0
class EventCreation:

    __e_new_event_xpath = Locators.BUTTONS['create']
    __e_event_name_xpath = Locators.PLACEHOLDER['text_ph'].format('Name')
    __e_event_req_name_xpath = Locators.PLACEHOLDER['text_ph'].format(
        'Requirement')
    __e_event_job_xpath = Locators.TITLE['title'].format('Job Roles')
    __e_event_slot_xpath = Locators.PLACEHOLDER['text_ph'].format('Slot')
    __e_event_from_date_xpath = Locators.PLACEHOLDER['place_holder'].format(
        'From')
    __e_event_to_date_xpath = Locators.PLACEHOLDER['place_holder'].format('To')
    __e_event_report_date_xpath = Locators.PLACEHOLDER['place_holder'].format(
        'Reporting Date')
    __e_event_manager_xpath = Locators.PLACEHOLDER['place_holder'].format(
        'Event Manager')
    __e_event_college_xpath = Locators.PLACEHOLDER['place_holder'].format(
        'College')
    __e_event_ec_css = Locators.BUTTONS['radio']
    __e_event_create_xpath = Locators.BUTTONS['actionClicked'].format(
        "'", 'create', "'")

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)
        self.scroll = PageScroll(self.driver)

    def new_event_button(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_new_event_xpath,
                                             'new_event_button')
            print('New event creation button - Clicked')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_name_field(self, event_name):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_event_name_xpath,
                                                 event_name,
                                                 'event_name_field')
            print(f'New event name - {event_name} - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_req_field(self, req_name):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_event_req_name_xpath,
                                                 req_name, 'event_req_field')
            time.sleep(1)
            self.wait.drop_down_selection()
            self.wait.loading()
            print(f'New event req name - {req_name} - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_job_field(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_event_job_xpath,
                                             'event_job_field')
            print('Event job field - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_slot_field(self, slot):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_event_slot_xpath,
                                                 slot, 'event_slot_field')
            self.wait.drop_down_selection()
            print(f'New event slot - {slot} - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_from_date(self, from_date):
        try:
            self.wait.web_element_wait_send_keys(
                By.XPATH, self.__e_event_from_date_xpath, from_date,
                'event_from_date')
            print(f'New Event from date - {from_date} - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_to_date(self, to_date):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_event_to_date_xpath,
                                                 to_date, 'event_to_date')
            print(f'New Event to date - {to_date} - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_report_date(self, report_date):
        try:
            self.wait.web_element_wait_send_keys(
                By.XPATH, self.__e_event_report_date_xpath, report_date,
                'event_to_date')
            print(f'New Event reporting date - {report_date} - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_manager_field(self, event_manager):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_event_manager_xpath,
                                                 event_manager,
                                                 'event_manager_field')
            self.wait.drop_down_selection()
            print(f'Event manager name - {event_manager} - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_college_field(self, college):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_event_college_xpath,
                                                 college,
                                                 'event_college_field')
            self.wait.drop_down_selection()
            print(f'Event college name - {college} - Entered')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_ec_enable(self):
        try:
            self.scroll.down(0, -50)
            time.sleep(0.6)
            button = ' Enable'
            self.wait.web_elements_wait_multiple_click(By.CSS_SELECTOR,
                                                       self.__e_event_ec_css,
                                                       button)
            print(f'Event Ec - {button} - Selected')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_create_button(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_event_create_xpath,
                                             'event_create_button')
            self.wait.drop_down_selection()
            print('Event Create button - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_create_notifier(self, message):
        try:
            time.sleep(0.7)
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_create_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            time.sleep(0.9)
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 27
0
class CloneAssessmentPage:
    """
    ----------------- WEB ELEMENT REFERENCE CLASS PRIVATE VARIABLES TO EASY ACCESS ------>>>>
    """
    __e_new_test_field_name = Locators.SEARCH['test_name']
    __e_test_from_date_xpath = Locators.PLACEHOLDER['place_holder'].format(
        'From')
    __e_test_to_date_xpath = Locators.PLACEHOLDER['place_holder'].format('To')
    __e_clone_button_xpath = Locators.BUTTONS['button'].format('Clone')

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)

    def new_test_name(self, new_test_name):
        try:
            time.sleep(0.7)
            self.wait.web_element_wait_send_keys(By.NAME,
                                                 self.__e_new_test_field_name,
                                                 new_test_name,
                                                 'new_test_name')
            print(f'New test name {new_test_name} - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def test_from_date(self, from_date):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_test_from_date_xpath,
                                                 from_date, 'new_test_name')
            print(f'New test from {from_date} - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def test_to_date(self, to_date):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_test_to_date_xpath,
                                                 to_date, 'new_test_name')
            print(f'New test from {to_date} - Entered')
            return True
        except Exception as error:
            ui_logger.error(error)

    def clone_test_button(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_clone_button_xpath,
                                             'requirement_name')
            print('Clone Assessment Button - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def clone_assessment_notifier(self, message):
        try:
            time.sleep(0.4)
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def clone_assessment_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            time.sleep(0.5)
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 28
0
class InterviewFeedback:

    __e_provide_select_drop_css = Locators.FEEDBACK['select_drop_down']
    __e_provide_comment_xpath = Locators.FEEDBACK['comments']
    __e_provide_overall_xpath = Locators.FEEDBACK['overall']
    __e_decision_button_xpath = Locators.FEEDBACK['decision_button']
    __e_feedback_submit_xpath = Locators.FEEDBACK['submit']
    __e_update_submit_xpath = Locators.FEEDBACK['update']
    __e_agree_xpath = Locators.BUTTONS['button'].format('Agree and Submit')
    __e_select_int_xpath = Locators.FEEDBACK['select_int']
    __e_save_draft_xpath = Locators.FEEDBACK['save_draft']
    __e_partial_submission_xpath = Locators.FEEDBACK['partial']

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.notifier = Notifier(self.driver)
        self.scroll = PageScroll(self.driver)

    def feedback_decision(self, decision):
        try:
            time.sleep(5)
            self.wait.loading()
            self.wait.web_elements_wait_click(By.XPATH,
                                              self.__e_decision_button_xpath,
                                              decision)
            print(f'Selected Decision - {decision}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def feedback_select_drop_down(self, value):
        try:
            time.sleep(0.5)
            self.wait.web_elements_wait_send_keys(
                By.XPATH, self.__e_provide_select_drop_css, value)
            print(f'Selected Rating - {value}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def feedback_comments(self, comment):
        try:
            time.sleep(0.5)
            self.wait.web_elements_wait_send_keys(
                By.XPATH, self.__e_provide_comment_xpath, comment)
            print(f'Given Comment - {comment}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def behalf_select_interviewers(self):
        try:
            time.sleep(1)
            self.wait.web_elements_wait_click(By.XPATH,
                                              self.__e_select_int_xpath, '')
            print('select_interviewers - selected')
            return True
        except Exception as error:
            ui_logger.error(error)

    def overall_comment(self, comment):
        try:
            self.wait.web_element_wait_send_keys(
                By.XPATH, self.__e_provide_overall_xpath, comment,
                'overall_comment')
            print(f'Given Overall Comment - {comment}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def partial_submission(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_partial_submission_xpath,
                                             'partial_submission')
            print('Partial - Submitted')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def submit_feedback(self):
        try:
            self.wait.loading()
            self.scroll.down(0, -80)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_feedback_submit_xpath,
                                             'submit_feedback_button')
            print('Feedback - Submitted')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def update_feedback(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_update_submit_xpath,
                                             'update_feedback')
            print('Update - Submitted')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def save_draft_old_feedback(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_save_draft_xpath,
                                             'submit_feedback_button')
            print('Save Draft - Submitted')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def agree_and_submit(self):
        try:
            time.sleep(1)
            self.wait.web_element_wait_click(By.XPATH, self.__e_agree_xpath,
                                             'feedback_form_validation')
            print('Agree and submit - Submitted')
            time.sleep(1.7)
            return True
        except Exception as error:
            ui_logger.error(error)

    def save_draft_notifier(self, message):
        try:
            self.notifier.glowing_messages(message)
            return True
        except Exception as error:
            ui_logger.error(error)

    def save_draft_notifier_dismiss(self):
        try:
            self.notifier.dismiss_message()
            return True
        except Exception as error:
            ui_logger.error(error)