Exemplo n.º 1
0
    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)
Exemplo n.º 2
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.º 3
0
class Actions:
    __e_test_actions_xpath = Locators.ACTIONS['actions_click']
    __e_clone_test_id = Locators.ACTIONS['clone_assessment']

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

        self.wait = WebElementWait(self.driver)
        self.scroll = PageScroll(self.driver)

    def assessment_actions_click(self):
        try:
            self.scroll.up(0, 50)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_test_actions_xpath,
                                             'assessment_actions_click')
            print('Assessment Actions - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def clone_assessment(self):
        try:
            time.sleep(1)
            self.wait.web_element_wait_click(By.ID, self.__e_clone_test_id,
                                             'clone_assessment')
            self.wait.loading()
            print('Clone Assessment action - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 4
0
class Actions:
    __e_job_actions_xpath = Locators.ACTIONS['actions_click']
    __e_job_tag_sp_id = Locators.ACTIONS['selection_process']
    __e_job_feed_id = Locators.ACTIONS['feedback_form']
    __e_job_int_id = Locators.ACTIONS['tag_interviewers']

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

        self.wait = WebElementWait(self.driver)
        self.scroll = PageScroll(self.driver)

    def job_actions_click(self):
        try:
            self.wait.loading()
            self.scroll.up(0, 100)
            time.sleep(1)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_job_actions_xpath,
                                             'Job_actions_click')
            print('Job Actions - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def tag_selection_process(self):
        try:
            self.wait.web_element_wait_click(By.ID, self.__e_job_tag_sp_id,
                                             'tag_selection_process')
            self.wait.loading()
            print('Selection Process action - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_feedback_form(self):
        try:
            self.wait.web_element_wait_click(By.ID, self.__e_job_feed_id,
                                             'job_feedback_form')
            self.wait.loading()
            print('Configured Feedback Form - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def job_tag_interviewers(self):
        try:
            self.wait.web_element_wait_click(By.ID, self.__e_job_int_id,
                                             'job_tag_interviewers')
            print('Tag Interviewers to Job - Clicked')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 5
0
    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.scroll = PageScroll(self.driver)
        self.notifier = Notifier(self.driver)

        self.button = 'Withdraw nomination'
Exemplo n.º 6
0
class RequirementSubTabs:
    __e_req_config_xpath = Locators.SUB_MENU['req_configurations']
    __e_req_duplicity_xpath = Locators.SUB_MENU['req_duplicity']
    __e_req_query_xpath = Locators.SUB_MENU['req_query']

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

    def requirement_configurations(self):
        try:
            self.scroll.up(0, 50)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_req_config_xpath,
                                             'job_configuration_tab')
            print('Job Configuration Tab - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def requirement_duplicity(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_req_duplicity_xpath,
                                             'requirement_duplicity')
            print('Requirement Duplicity check - On')
            return True
        except Exception as error:
            ui_logger.error(error)

    def requirement_query(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_req_query_xpath,
                                             'requirement_query')
            print('Requirement Query Configuration tab - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 7
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)
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)
 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)
Exemplo n.º 10
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)
Exemplo n.º 11
0
class EventApplicantActions:

    __e_status_change_id = Locators.ACTIONS['status_change']
    __e_more_button_xpath = Locators.ACTIONS['app_more']
    __e_app_action_xpath = Locators.BUTTONS['all_buttons']
    __e_provide_feedback_id = Locators.ACTIONS['provide_feedback']
    __e_cancel_request_id = Locators.ACTIONS['cancel_request']
    __e_cancel_interview_id = Locators.ACTIONS['cancel_interview']
    __e_unlock_feedback_id = Locators.ACTIONS['unlock_feedback']

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.scroll = PageScroll(self.driver)
    """
     ****--------------------- Event Applicant Action Functions ---------------------------------****
    """
    def change_status_action(self):
        try:
            self.wait.web_element_wait_click(By.ID, self.__e_status_change_id, 'Applicant_status_change')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def more_action(self):
        try:
            self.scroll.up(0, 50)
            self.wait.web_element_wait_click(By.XPATH, self.__e_more_button_xpath, 'more_action')
            print('Clicked on - Applicant More actions')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def quick_interview_action(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_app_action_xpath.format('Quick Interview Schedule'),
                                             'quick_interview_action')
            time.sleep(2)
            print('Quick Interview Action - Clicked')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    """
     ****--------------------- Event Interviews Applicant Action Functions ---------------------------------****
    """
    def provide_feedback_action(self):
        try:
            self.scroll.down(0, -50)
            self.wait.web_element_wait_click(By.ID, self.__e_provide_feedback_id, 'provide_feedback_action')
            time.sleep(2)
            print('Provide Feedback Action - Clicked')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def cancel_interview_request_action(self):
        try:
            self.scroll.down(0, -50)
            self.wait.web_element_wait_click(By.ID, self.__e_cancel_request_id, 'cancel_interview_request_action')
            time.sleep(2)
            print('Cancel Request Action - Clicked')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def cancel_interview_action(self):
        try:
            self.scroll.down(0, -50)
            self.wait.web_element_wait_click(By.ID, self.__e_cancel_interview_id, 'cancel_interview_action')
            time.sleep(2)
            print('Cancel Interview Action - Clicked')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def unlock_feedback_action(self):
        try:
            self.scroll.down(0, -50)
            self.wait.web_element_wait_click(By.ID, self.__e_unlock_feedback_id, 'unlock_feedback_action')
            print('Unlock Feedback Action - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 12
0
 def __init__(self, driver):
     self.driver = driver
     self.wait = WebElementWait(self.driver)
     self.tab_title = appTitle.Title(self.driver)
     self.scroll = PageScroll(self.driver)
Exemplo n.º 13
0
class Menu:
    __e_menu = Locators.MENU['menu']
    __e_menu_embrace = Locators.MENU['embrace']
    __e_embrace_candidate_xpath = Locators.EMBRACE['candidate_tab']

    def __init__(self, driver):
        self.driver = driver
        self.wait = WebElementWait(self.driver)
        self.tab_title = appTitle.Title(self.driver)
        self.scroll = PageScroll(self.driver)

    def job_tab(self, job_menu_name, tab_title):
        try:
            self.wait.web_element_wait_click(
                By.XPATH, self.__e_menu.format(job_menu_name),
                'not_in_job_roles')
            self.wait.loading()
            assert self.tab_title.tab_title(
                tab_title) == tab_title, 'Webdriver is in wrong tab'
            return True
        except Exception as error:
            ui_logger.error(error)

    def requirement_tab(self, req_menu_name, tab_title):
        try:
            self.scroll.up(0, 50)
            self.wait.web_element_wait_click(
                By.XPATH, self.__e_menu.format(req_menu_name),
                'not_in_Requirements')
            self.wait.loading()
            assert self.tab_title.tab_title(
                tab_title) == tab_title, 'Webdriver is in wrong tab'
            return True
        except Exception as error:
            ui_logger.error(error)

    def assessment_tab(self, assess_menu_name, tab_title):
        try:
            self.wait.web_element_wait_click(
                By.XPATH, self.__e_menu.format(assess_menu_name),
                'not_in_assessments')
            self.wait.loading()
            assert self.tab_title.tab_title(
                tab_title) == tab_title, 'Webdriver is in wrong tab'
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_tab(self, event_menu_name, tab_title):
        try:
            self.wait.web_element_wait_click(
                By.XPATH, self.__e_menu.format(event_menu_name),
                'not_in_Events')
            self.wait.loading()
            assert self.tab_title.tab_title(
                tab_title) == tab_title, 'Webdriver is in wrong tab'
            return True
        except Exception as error:
            ui_logger.error(error)

    def nominations_tab(self, nom_menu_name, tab_title):
        try:
            self.wait.web_element_wait_click(
                By.XPATH, self.__e_menu.format(nom_menu_name),
                'not_in_job_roles')
            assert self.tab_title.tab_title(
                tab_title) == tab_title, 'Webdriver is in wrong tab'
            time.sleep(2)
            return True
        except Exception as error:
            ui_logger.error(error)

    def more_tab(self, more_menu_name):
        try:
            self.wait.web_element_wait_click(
                By.XPATH, self.__e_menu.format(more_menu_name), 'not_in_More')
            return True
        except Exception as error:
            ui_logger.error(error)

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

    def embrace_candidate_tab(self):
        try:
            self.wait.embrace_loading()
            time.sleep(1)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_embrace_candidate_xpath,
                                             'not_in_Embrace_candidate_tab')
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 14
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.º 15
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.º 16
0
class Actions:
    __e_event_actions_xpath = Locators.ACTIONS['actions_click']
    __e_event_candidates_id = Locators.ACTIONS['view_candidates']
    __e_event_slot_id = Locators.ACTIONS['slot_config']
    __e_event_lobby_id = Locators.ACTIONS['lobby']
    __e_event_interview_lobby_id = Locators.ACTIONS['panel']
    __e_event_upload_candidates_id = Locators.ACTIONS['upload_candidate']
    __e_event_owners_id = Locators.ACTIONS['event_owners']
    __e_event_live_int_id = Locators.ACTIONS['live_interviews']
    __e_event_interviews_id = Locators.ACTIONS['event_interviews']
    __e_manage_interviewers_id = Locators.ACTIONS['manage_interviewers']

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

        self.wait = WebElementWait(self.driver)
        self.scroll = PageScroll(self.driver)

    def event_actions_click(self):
        try:
            self.scroll.up(0, 100)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_event_actions_xpath,
                                             'Event_actions_click')
            print('Event Actions - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_view_candidates(self):
        try:
            self.wait.web_element_wait_click(By.ID,
                                             self.__e_event_candidates_id,
                                             'Event_candidates_action')
            self.wait.loading()
            print('Event View Applicant - Screen')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_slot_configuration(self):
        try:
            self.wait.web_element_wait_click(By.ID, self.__e_event_slot_id,
                                             'Event_slot_config_action')
            self.wait.loading()
            print('Event slot configuration - Screen')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_lobby(self):
        try:
            self.wait.web_element_wait_click(By.ID, self.__e_event_lobby_id,
                                             'View_Event_Lobby')
            self.wait.loading()
            print('View Event Lobby - Screen')
            return True
        except Exception as error:
            ui_logger.error(error)

    def interview_lobby_panel(self):
        try:
            self.wait.web_element_wait_click(By.ID,
                                             self.__e_event_interview_lobby_id,
                                             'Interviewer_Lobby_panel')
            self.wait.loading()
            print('Event_interviewer_lobby - Screen')
            time.sleep(5)
            print('Event_interviewer_lobby - whiteScreen')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_upload_candidates(self):
        try:
            time.sleep(0.5)
            self.wait.web_element_wait_click(
                By.ID, self.__e_event_upload_candidates_id,
                'event_upload_candidates')
            self.wait.loading()
            print('Event Upload Candidate - Screen')
            return True
        except Exception as error:
            ui_logger.error(error)

    def manage_event_owners(self):
        try:
            self.wait.web_element_wait_click(By.ID, self.__e_event_owners_id,
                                             'manage_event_owners')
            self.wait.loading()
            print('Event Owners adding - Screen')
            return True
        except Exception as error:
            ui_logger.error(error)

    def live_interview_schedule(self):
        try:
            self.wait.web_element_wait_click(By.ID, self.__e_event_live_int_id,
                                             'live_interview_schedule')
            self.wait.loading()
            print('Event live interview schedule - Screen')
            return True
        except Exception as error:
            ui_logger.error(error)

    def event_interviews(self):
        try:
            self.wait.web_element_wait_click(By.ID,
                                             self.__e_event_interviews_id,
                                             'event_interviews')
            self.wait.loading()
            print('Event interviews - Screen')
            return True
        except Exception as error:
            ui_logger.error(error)

    def manage_interviewers(self):
        try:
            self.wait.web_element_wait_click(By.ID,
                                             self.__e_manage_interviewers_id,
                                             'manage_interviewers')
            print('manage_interviewers - Screen')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 17
0
class EventSubTabs:
    __e_event_config_xpath = Locators.SUB_MENU['configurations']
    __e_event_owners_xpath = Locators.SUB_MENU['owners']
    __e_event_tracking_xpath = Locators.SUB_MENU['event_tracking']
    __e_cancel_request_xpath = Locators.SUB_MENU['cancel_request']
    __e_manage_candidates = Locators.BUTTONS['all_buttons'].format(
        'Manage Candidates')

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

    def event_configurations(self):
        try:
            self.scroll.up(0, -100)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_event_config_xpath,
                                             'Event_configurations_tab')
            time.sleep(0.5)
            print('Event Configurations Tab - Landed')
            self.scroll.up(0, 200)
            return True
        except Exception as error:
            ui_logger.error(error)

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

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

    def tracking(self):
        try:
            self.scroll.up(0, -60)
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_event_tracking_xpath,
                                             'event_tracking')
            return True
        except Exception as error:
            ui_logger.error(error)

    def cancel_request_tab(self):
        try:
            self.wait.web_element_wait_click(By.XPATH,
                                             self.__e_cancel_request_xpath,
                                             'cancel_request_tab')
            time.sleep(1)
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 18
0
class Login:
    """
    ----------------- WEB ELEMENT REFERENCE CLASS PRIVATE VARIABLES TO EASY ACCESS ------>>>>
    """
    __e_tenant_name = Locators.LOGIN['alias']
    __e_next_button_css = Locators.LOGIN['next']
    __e_login_name_l = Locators.LOGIN['login_name']
    __e_password_xpath = Locators.LOGIN['password']
    __e_login_button_css = Locators.LOGIN['login']
    __e_anchor_tag = Locators.TAG['anchor']
    __e_logout_id = Locators.LOGIN['logout']
    __e_click_xpath = Locators.LOGIN['click_to_login']

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

    def tenant(self, tenant_name):
        self.wait.web_element_wait_send_keys(By.NAME, self.__e_tenant_name,
                                             tenant_name, 'login_tenant_field')

    def next_button(self):
        self.wait.web_element_wait_click(By.CSS_SELECTOR,
                                         self.__e_next_button_css,
                                         'login_next_button')

    def login_name(self, login_name):
        try:
            time.sleep(1.5)
            self.wait.web_element_wait_send_keys(By.NAME,
                                                 self.__e_login_name_l,
                                                 login_name,
                                                 'login_name_field')
            return True
        except Exception as error:
            ui_logger.error(error)

    def password(self, password):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH,
                                                 self.__e_password_xpath,
                                                 password,
                                                 'login_password_field')
            return True
        except Exception as error:
            ui_logger.error(error)

    def login_button(self):
        try:
            self.wait.web_element_wait_click(By.CLASS_NAME,
                                             self.__e_login_button_css,
                                             'login_button')
            return True
        except Exception as error:
            ui_logger.error(error)

    def login_account_name_verification(self, user_name):
        try:
            self.wait.loading()
            assert self.wait.web_elements_wait_text(By.TAG_NAME, self.__e_anchor_tag, user_name) == user_name, \
                'Logged in different account please check the details'
            return True
        except Exception as error:
            ui_logger.error(error)

    def login_account_click(self, user_name):
        try:
            self.wait.web_elements_wait_click(By.TAG_NAME, self.__e_anchor_tag,
                                              user_name)
            print(f'Current account name is - {user_name}')
            return True
        except Exception as error:
            ui_logger.error(error)

    def login_out(self):
        try:
            time.sleep(0.5)
            self.scroll.up(0, 60)
            time.sleep(0.5)
            self.wait.web_element_wait_click(By.ID, self.__e_logout_id,
                                             'Logout from account')
            print('Logging Out - from application')
            return True
        except Exception as error:
            ui_logger.error(error)

    def click_here_to_login(self):
        try:
            time.sleep(2)
            self.wait.web_element_wait_click(By.XPATH, self.__e_click_xpath,
                                             'Logout from account')
            print('Re-login - Clicked for login screen')
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 19
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.º 20
0
class EventUploadCandidate:

    __e_upload_xpath = Locators.ATTACHMENT['file']
    __e_next_button_xpath = Locators.BUTTONS['button'].format('Next')
    __e_declare_xpath = Locators.CHECKBOX['type']
    __e_signature_xpath = Locators.CANDIDATE['upload_signature']
    __e_agree_xpath = Locators.BUTTONS['button'].format('I Agree')
    __e_edit_info_xpath = Locators.TITLE['title'].format('Edit')
    __e_name_xpath = Locators.CANDIDATE['name_field']
    __e_email_xpath = Locators.CANDIDATE['email_field']
    __e_usn_xpath = Locators.CANDIDATE['usn_field']
    __e_save_button_xpath = Locators.CANDIDATE['save_info']
    __e_save_candidate_xpath = Locators.CANDIDATE['save']
    __e_upload_count_css = Locators.CANDIDATE['Upload_count']
    __e_close_button_xpath = Locators.BUTTONS['button'].format('Close')
    __e_close_main_xpath = Locators.BUTTONS['close']
    __e_confirm_close_main_xpath = Locators.BUTTONS['all_buttons'].format('OK')

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

    def upload_file(self, upload_file):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_upload_xpath, upload_file,
                                                 'upload_file')
            print('Candidate excel sheet - Uploading')
            self.wait.uploading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def next_button(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_next_button_xpath, 'upload_file')
            print('Candidate scree next button - Clicked')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)

    def declare_check(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_declare_xpath, 'declare_check')
            print('Declare Check - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def signature_entry(self):
        try:
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_signature_xpath, 'VinodKumar',
                                                 'signature_entry')
            print('Signature Entry - Signed')
            return True
        except Exception as error:
            ui_logger.error(error)

    def agreed_button(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_agree_xpath, 'agreed_button')
            print('Agreed Button - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def edit_excel_information(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_edit_info_xpath, 'edit_excel_information')
            print('Edit Information button - Clicked')
            return True
        except Exception as error:
            ui_logger.error(error)

    def name_edit(self, candidate_name):
        try:
            self.wait.clear(By.XPATH, self.__e_name_xpath, 'Name_field_clear')
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_name_xpath, candidate_name,
                                                 'name_edit')
            print('Name information - Changed')
            return True
        except Exception as error:
            ui_logger.error(error)

    def email_edit(self, candidate_email):
        try:
            self.wait.clear(By.XPATH, self.__e_email_xpath, 'Name_field_clear')
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_email_xpath, candidate_email,
                                                 'email_edit')
            print('Email information - Changed')
            return True
        except Exception as error:
            ui_logger.error(error)

    def usn_edit(self, usn_email):
        try:
            self.wait.clear(By.XPATH, self.__e_usn_xpath, 'Name_field_clear')
            self.wait.web_element_wait_send_keys(By.XPATH, self.__e_usn_xpath, usn_email,
                                                 'email_edit')
            print('Usn information - Changed')
            return True
        except Exception as error:
            ui_logger.error(error)

    def save_info(self):
        try:
            self.scroll.down(0, -50)
            self.wait.web_element_wait_click(By.XPATH, self.__e_save_button_xpath, 'save_info')
            print('Save information - Saved')
            return True
        except Exception as error:
            ui_logger.error(error)

    def save_candidate(self):
        try:
            time.sleep(1)
            self.wait.web_element_wait_click(By.XPATH, self.__e_save_candidate_xpath, 'save_candidate')
            print('Save Candidate - Saved')
            return True
        except Exception as error:
            ui_logger.error(error)

    def success_upload(self, message):
        try:
            time.sleep(3)
            self.wait.web_element_wait_text(By.CSS_SELECTOR, self.__e_upload_count_css, 'success_upload')
            if self.wait.text_value.strip() == message:
                print(f'Success {self.wait.text_value.strip()} - Count')
                return True
        except Exception as error:
            ui_logger.error(error)

    def close_candidate_screen(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_close_button_xpath, 'close_candidate_screen')
            print('Close Candidate Screen - Closed')
            return True
        except Exception as error:
            ui_logger.error(error)

    def close_main_screen(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_close_main_xpath, 'close_main_screen')
            print('Close Main Screen - Closed')
            return True
        except Exception as error:
            ui_logger.error(error)

    def confirm_close_main_screen(self):
        try:
            self.wait.web_element_wait_click(By.XPATH, self.__e_confirm_close_main_xpath, 'confirm_close_main_screen')
            print('Confirm Close Main Screen - Closed')
            self.wait.loading()
            return True
        except Exception as error:
            ui_logger.error(error)
Exemplo n.º 21
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.º 22
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)
 def __init__(self, driver):
     self.driver = driver
     self.wait = WebElementWait(self.driver)
     self.scroll = PageScroll(self.driver)
Exemplo n.º 24
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)