def __init__(self, driver, index, version):
        self.driver = driver
        self.feedback = InterviewFeedback(self.driver)
        self.new_tab = SwitchWindow.SwitchWindowClose(self.driver)
        self.search = Search(self.driver)
        self.applicant_grid = EventApplicant(self.driver)
        self.applicant_action = EventApplicantActions(self.driver)
        self.bucket = BucketSelectionPage(self.driver)
        """
        ----------------- EXCEL READ AND TO ASSIGN VALUES TO RESPECTIVE INIT VARIABLES ------>>>>
        """
        feed_excel = excelRead.ExcelRead()
        feed_excel.read(inputFile.INPUT_PATH['feedback'], index=index)
        xl = feed_excel.excel_dict
        self.xl_bucket = xl['completed_bucket'][0]
        self.xl_candidate_name = xl['event_name'][0].format(version)
        self.xl_pending_decision = xl['pending'][0]
        self.xl_shortlist_decision = xl['shortlist'][0]
        self.xl_rating = xl['rating'][0]
        self.xl_rating1 = xl['rating1'][0]
        self.xl_comment = xl['unlock_comment'][0]
        self.xl_overall = xl['unlock_overall'][0]

        self.int1_feedback_collection = []
        self.pf1_collection = []
        self.update_f_d_collection = []
        self.completed_bucket_collection = []
    def __init__(self, driver, index, version):
        self.driver = driver
        self.live = LiveIntSchedulePage(self.driver)
        self.feedback = InterviewFeedback(self.driver)
        self.new_tab = SwitchWindow.SwitchWindowClose(self.driver)
        self.event_action = EventActionsPage.Actions(self.driver)
        self.search = Search(self.driver)
        self.applicant_grid = EventApplicant(self.driver)
        self.applicant_action = EventApplicantActions(self.driver)
        self.bucket = BucketSelectionPage(self.driver)
        """
        ----------------- EXCEL READ AND TO ASSIGN VALUES TO RESPECTIVE INIT VARIABLES ------>>>>
        """
        status_excel = excelRead.ExcelRead()
        status_excel.read(inputFile.INPUT_PATH['event_status_change'],
                          index=index)
        xl = status_excel.excel_dict
        self.xl_event_name = xl['event_name'][0].format(version)
        self.xl_live_stage = xl['live_stage'][0]

        feed_excel = excelRead.ExcelRead()
        feed_excel.read(inputFile.INPUT_PATH['feedback'], index=index)
        xl = feed_excel.excel_dict
        self.xl_candidate_name = xl['event_name'][0].format(version)
        self.xl_shortlist_decision = xl['shortlist'][0]
        self.xl_rating = xl['rating'][0]
        self.xl_comment = xl['quick_comment'][0]
        self.xl_overall = xl['quick_overall'][0]
        self.xl_bucket = xl['partial_bucket'][0]

        self.int2_feedback_collection = []
        self.pf2_collection = []
        self.partial_collection = []
    def __init__(self, driver, index, version):
        self.driver = driver
        self.applicant_grid = EventApplicant(self.driver)
        self.getby = CandidateDetailsPage(self.driver)
        self.applicant_action = EventApplicantActions(self.driver)
        self.quick_schedule = QuickIntSchedulePage(self.driver)
        self.multi_select = MultiSelectValues(self.driver)
        self.switch_window = SwitchWindowClose(self.driver)
        """
        ----------------- EXCEL READ AND TO ASSIGN VALUES TO RESPECTIVE INIT VARIABLES ------>>>>
        """
        int_excel = excelRead.ExcelRead()
        int_excel.read(inputFile.INPUT_PATH['interview_lobby'], index=index)
        xl = int_excel.excel_dict
        self.xl_int1_name = xl['int1_name'][0]
        self.xl_int2_name = xl['int2_name'][0]

        status_excel = excelRead.ExcelRead()
        status_excel.read(inputFile.INPUT_PATH['event_status_change'],
                          index=index)
        xl = status_excel.excel_dict
        self.xl_quick_stage = xl['live_stage'][0]
        self.xl_quick_comment = xl['quick_comment'][0]
        self.xl_quick_message = xl['live_message'][0]
        self.xl_app_name = xl['event_name'][0].format(version)
        self.xl_schedule_status = xl['schedule'][0]

        self.quick_config_collection = []
        self.quick_schedule_collection = []
    def __init__(self, driver, index, version):
        self.driver = driver
        self.new_tab = SwitchWindow.SwitchWindowClose(self.driver)
        self.event_action = EventActionsPage.Actions(self.driver)
        self.search = Search(self.driver)
        self.applicant_grid = EventApplicant(self.driver)
        self.applicant_action = EventApplicantActions(self.driver)
        self.cancel_request = CancelInterview(self.driver)
        """
        ----------------- EXCEL READ AND TO ASSIGN VALUES TO RESPECTIVE INIT VARIABLES ------>>>>
        """
        cancel_excel = excelRead.ExcelRead()
        cancel_excel.read(inputFile.INPUT_PATH['cancel_interview'],
                          index=index)
        xl = cancel_excel.excel_dict
        self.xl_event_name = xl['name'][0].format(version)
        self.xl_comment = xl['comment'][0]
        self.xl_message = xl['cancel_interview'][0]

        self.int2_cancel_collection = []
    def __init__(self, driver, index, version):
        self.driver = driver
        self.login = Login(self.driver)
        self.search = AdvanceSearchPage.Search(self.driver)
        self.getby = EventGetByNamePage.EventGetByName(self.driver)
        self.menu = Menu(self.driver)
        self.event_action = EventActionsPage.Actions(self.driver)
        self.bucket = BucketSelectionPage(self.driver)
        self.applicant_grid = EventApplicant(self.driver)
        self.applicant_action = EventApplicantActions(self.driver)
        self.unlock = UnlockFeedback(self.driver)
        """
        ----------------- EXCEL READ AND TO ASSIGN VALUES TO RESPECTIVE INIT VARIABLES ------>>>>
        """
        excel = excelRead.ExcelRead()
        excel.read(inputFile.INPUT_PATH['interview_lobby'], index=index)
        xl = excel.excel_dict
        self.xl_account_name = xl['account_name'][0]
        self.xl_int2_name = xl['int2_name'][0]
        self.xl_event = xl['event_name'][0].format(version)
        self.xl_menu = xl['menu'][0]
        self.xl_title = xl['tab_title'][0]

        login_excel = excelRead.ExcelRead()
        login_excel.read(inputFile.INPUT_PATH['login_excel'], index=index)
        xl = login_excel.excel_dict
        self.xl_name = xl['c_login_name'][0]
        self.xl_pwd = xl['c_password'][0]

        unlock_excel = excelRead.ExcelRead()
        unlock_excel.read(inputFile.INPUT_PATH['feedback'], index=index)
        xl = unlock_excel.excel_dict
        self.xl_bucket = xl['completed_bucket'][0]
        self.xl_unlock_comment = xl['unlock_comment'][0]
        self.xl_unlock_message = xl['unlock_message'][0]

        self.admin_collection = []
        self.unlock_collection = []
Beispiel #6
0
class CrpoInt1CancelRequest:
    def __init__(self, driver, index, version):
        self.driver = driver
        self.new_tab = SwitchWindow.SwitchWindowClose(self.driver)
        self.event_action = EventActionsPage.Actions(self.driver)
        self.search = Search(self.driver)
        self.applicant_grid = EventApplicant(self.driver)
        self.applicant_action = EventApplicantActions(self.driver)
        self.cancel_request = CancelInterview(self.driver)
        """
        ----------------- EXCEL READ AND TO ASSIGN VALUES TO RESPECTIVE INIT VARIABLES ------>>>>
        """
        cancel_excel = excelRead.ExcelRead()
        cancel_excel.read(inputFile.INPUT_PATH['cancel_interview'],
                          index=index)
        xl = cancel_excel.excel_dict
        self.xl_event_name = xl['name'][0].format(version)
        self.xl_reason = xl['reason'][0]
        self.xl_comment = xl['comment'][0]
        self.xl_message = xl['cancel_request_message'][0]

        self.int1_cancel_collection = []

    def raise_request_to_cancel(self):
        self.int1_cancel_collection = []
        __list = [
            self.event_action.event_actions_click(),
            self.event_action.event_interviews(),
            self.search.advance_search(),
            self.search.candidate_name_field(self.xl_event_name),
            self.search.search_button(),
            self.applicant_grid.select_applicant(),
            self.applicant_action.cancel_interview_request_action(),
            self.cancel_request.cancel_interview_request_reason(
                self.xl_reason),
            self.cancel_request.cancel_interview_request_comment(
                self.xl_comment),
            self.cancel_request.cancel_interview_request_save(),
            self.cancel_request.change_status_notifier(self.xl_message),
            self.cancel_request.change_status_notifier_dismiss(),
        ]
        for func in __list:
            if func:
                self.int1_cancel_collection.append(func)
            else:
                self.int1_cancel_collection.append(func)
class CrpoInt2Feedback:
    def __init__(self, driver, index, version):
        self.driver = driver
        self.live = LiveIntSchedulePage(self.driver)
        self.feedback = InterviewFeedback(self.driver)
        self.new_tab = SwitchWindow.SwitchWindowClose(self.driver)
        self.event_action = EventActionsPage.Actions(self.driver)
        self.search = Search(self.driver)
        self.applicant_grid = EventApplicant(self.driver)
        self.applicant_action = EventApplicantActions(self.driver)
        self.bucket = BucketSelectionPage(self.driver)
        """
        ----------------- EXCEL READ AND TO ASSIGN VALUES TO RESPECTIVE INIT VARIABLES ------>>>>
        """
        status_excel = excelRead.ExcelRead()
        status_excel.read(inputFile.INPUT_PATH['event_status_change'],
                          index=index)
        xl = status_excel.excel_dict
        self.xl_event_name = xl['event_name'][0].format(version)
        self.xl_live_stage = xl['live_stage'][0]

        feed_excel = excelRead.ExcelRead()
        feed_excel.read(inputFile.INPUT_PATH['feedback'], index=index)
        xl = feed_excel.excel_dict
        self.xl_candidate_name = xl['event_name'][0].format(version)
        self.xl_shortlist_decision = xl['shortlist'][0]
        self.xl_rating = xl['rating'][0]
        self.xl_comment = xl['quick_comment'][0]
        self.xl_overall = xl['quick_overall'][0]
        self.xl_bucket = xl['partial_bucket'][0]

        self.int2_feedback_collection = []
        self.pf2_collection = []
        self.partial_collection = []

    def quick_interview2_feedback(self):
        self.int2_feedback_collection = []
        __list = [
            self.event_action.event_actions_click(),
            self.event_action.event_interviews(),
            self.search.advance_search(),
            self.search.candidate_name_field(self.xl_event_name),
            self.search.search_button(),
            self.applicant_grid.select_applicant(),
            self.applicant_action.provide_feedback_action(),
            self.new_tab.switch_to_window(1)
        ]
        for func in __list:
            if func:
                self.int2_feedback_collection.append(func)
            else:
                self.int2_feedback_collection.append(func)

    def int2_partial_submission(self):
        self.partial_collection = []
        __list = [
            self.feedback.feedback_decision(self.xl_shortlist_decision),
            self.feedback.feedback_select_drop_down(self.xl_rating),
            self.feedback.feedback_comments(self.xl_comment),
            self.feedback.overall_comment(self.xl_overall),
            self.feedback.partial_submission(),
            self.feedback.agree_and_submit(),
            self.new_tab.window_close(),
            self.new_tab.switch_to_window(0),
        ]
        for func in __list:
            if func:
                self.partial_collection.append(func)
            else:
                self.partial_collection.append(func)

    def int2_provide_feedback(self):
        self.pf2_collection = []
        __list = [
            self.bucket.bucket_select(self.xl_bucket),
            self.applicant_grid.select_applicant(),
            self.applicant_action.provide_feedback_action(),
            self.new_tab.switch_to_window(1),
            self.feedback.submit_feedback(),
            self.feedback.agree_and_submit(),
            self.feedback.agree_and_submit(),
            self.new_tab.window_close(),
            self.new_tab.switch_to_window(0),
        ]
        for func in __list:
            if func:
                self.pf2_collection.append(func)
            else:
                self.pf2_collection.append(func)
class CrpoAdminLogin:
    def __init__(self, driver, index, version):
        self.driver = driver
        self.login = Login(self.driver)
        self.search = AdvanceSearchPage.Search(self.driver)
        self.getby = EventGetByNamePage.EventGetByName(self.driver)
        self.menu = Menu(self.driver)
        self.event_action = EventActionsPage.Actions(self.driver)
        self.bucket = BucketSelectionPage(self.driver)
        self.applicant_grid = EventApplicant(self.driver)
        self.applicant_action = EventApplicantActions(self.driver)
        self.unlock = UnlockFeedback(self.driver)
        """
        ----------------- EXCEL READ AND TO ASSIGN VALUES TO RESPECTIVE INIT VARIABLES ------>>>>
        """
        excel = excelRead.ExcelRead()
        excel.read(inputFile.INPUT_PATH['interview_lobby'], index=index)
        xl = excel.excel_dict
        self.xl_account_name = xl['account_name'][0]
        self.xl_int2_name = xl['int2_name'][0]
        self.xl_event = xl['event_name'][0].format(version)
        self.xl_menu = xl['menu'][0]
        self.xl_title = xl['tab_title'][0]

        login_excel = excelRead.ExcelRead()
        login_excel.read(inputFile.INPUT_PATH['login_excel'], index=index)
        xl = login_excel.excel_dict
        self.xl_name = xl['c_login_name'][0]
        self.xl_pwd = xl['c_password'][0]

        unlock_excel = excelRead.ExcelRead()
        unlock_excel.read(inputFile.INPUT_PATH['feedback'], index=index)
        xl = unlock_excel.excel_dict
        self.xl_bucket = xl['completed_bucket'][0]
        self.xl_unlock_comment = xl['unlock_comment'][0]
        self.xl_unlock_message = xl['unlock_message'][0]

        self.admin_collection = []
        self.unlock_collection = []

    def admin_login(self):
        self.admin_collection = []
        __list = [
            self.login.login_account_click(self.xl_int2_name),
            self.login.login_out(),
            self.login.click_here_to_login(),
            self.login.login_name(self.xl_name),
            self.login.password(self.xl_pwd),
            self.login.login_button(),
            self.login.login_account_name_verification(self.xl_account_name),
            self.menu.event_tab(self.xl_menu, self.xl_title),
            self.search.advance_search(),
            self.search.name_field(self.xl_event),
            self.search.search_button(),
            self.getby.event_name_click(),
            self.getby.event_name_validation(self.xl_event),
        ]
        for func in __list:
            if func:
                self.admin_collection.append(func)
            else:
                self.admin_collection.append(func)

    def admin_unlock(self):
        self.unlock_collection = []
        __list = [
            self.event_action.event_actions_click(),
            self.event_action.event_interviews(),
            self.bucket.bucket_select(self.xl_bucket),
            self.applicant_grid.select_applicant(),
            self.applicant_action.unlock_feedback_action(),
            self.unlock.select_all_interviewers(),
            self.unlock.unlock_button(),
            self.unlock.unlock_request_comment(self.xl_unlock_comment),
            self.unlock.ok_button(),
            self.unlock.unlock_status_notifier(self.xl_unlock_message),
            self.unlock.unlock_status_notifier_dismiss(),
            self.unlock.close_button()
        ]
        for func in __list:
            if func:
                self.unlock_collection.append(func)
            else:
                self.unlock_collection.append(func)
class CrpoInt1Feedback:
    def __init__(self, driver, index, version):
        self.driver = driver
        self.feedback = InterviewFeedback(self.driver)
        self.new_tab = SwitchWindow.SwitchWindowClose(self.driver)
        self.search = Search(self.driver)
        self.applicant_grid = EventApplicant(self.driver)
        self.applicant_action = EventApplicantActions(self.driver)
        self.bucket = BucketSelectionPage(self.driver)
        """
        ----------------- EXCEL READ AND TO ASSIGN VALUES TO RESPECTIVE INIT VARIABLES ------>>>>
        """
        feed_excel = excelRead.ExcelRead()
        feed_excel.read(inputFile.INPUT_PATH['feedback'], index=index)
        xl = feed_excel.excel_dict
        self.xl_bucket = xl['completed_bucket'][0]
        self.xl_candidate_name = xl['event_name'][0].format(version)
        self.xl_pending_decision = xl['pending'][0]
        self.xl_shortlist_decision = xl['shortlist'][0]
        self.xl_rating = xl['rating'][0]
        self.xl_rating1 = xl['rating1'][0]
        self.xl_comment = xl['unlock_comment'][0]
        self.xl_overall = xl['unlock_overall'][0]

        self.int1_feedback_collection = []
        self.pf1_collection = []
        self.update_f_d_collection = []
        self.completed_bucket_collection = []

    def completed_bucket(self):
        self.completed_bucket_collection = []
        __list = [self.bucket.bucket_select(self.xl_bucket)]
        for func in __list:
            if func:
                self.completed_bucket_collection.append(func)
            else:
                self.completed_bucket_collection.append(func)

    def interview1_feedback(self):
        self.int1_feedback_collection = []
        __list = [
            self.search.advance_search(),
            self.search.candidate_name_field(self.xl_candidate_name),
            self.search.search_button(),
            self.applicant_grid.select_applicant(),
            self.applicant_action.provide_feedback_action(),
            self.new_tab.switch_to_window(1)
        ]
        for func in __list:
            if func:
                self.int1_feedback_collection.append(func)
            else:
                self.int1_feedback_collection.append(func)

    def int1_provide_feedback(self):
        self.pf1_collection = []
        __list = [
            self.feedback.feedback_decision(self.xl_pending_decision),
            self.feedback.feedback_select_drop_down(self.xl_rating),
            self.feedback.feedback_comments(self.xl_comment),
            self.feedback.overall_comment(self.xl_overall),
            self.feedback.submit_feedback(),
            self.feedback.agree_and_submit(),
            self.feedback.agree_and_submit(),
            self.new_tab.switch_to_window(0),
        ]
        for func in __list:
            if func:
                self.pf1_collection.append(func)
            else:
                self.pf1_collection.append(func)

    def int1_update_feedback_decision(self):
        self.update_f_d_collection = []
        __list = [
            self.feedback.feedback_decision(self.xl_shortlist_decision),
            self.feedback.feedback_select_drop_down(self.xl_rating1),
            self.feedback.feedback_comments(self.xl_comment),
            self.feedback.overall_comment(self.xl_overall),
            self.feedback.update_feedback(),
            self.feedback.agree_and_submit(),
            self.feedback.agree_and_submit(),
            self.new_tab.switch_to_window(0),
        ]
        for func in __list:
            if func:
                self.update_f_d_collection.append(func)
            else:
                self.update_f_d_collection.append(func)
class CRPOQuickInterviewSchedule:
    def __init__(self, driver, index, version):
        self.driver = driver
        self.applicant_grid = EventApplicant(self.driver)
        self.getby = CandidateDetailsPage(self.driver)
        self.applicant_action = EventApplicantActions(self.driver)
        self.quick_schedule = QuickIntSchedulePage(self.driver)
        self.multi_select = MultiSelectValues(self.driver)
        self.switch_window = SwitchWindowClose(self.driver)
        """
        ----------------- EXCEL READ AND TO ASSIGN VALUES TO RESPECTIVE INIT VARIABLES ------>>>>
        """
        int_excel = excelRead.ExcelRead()
        int_excel.read(inputFile.INPUT_PATH['interview_lobby'], index=index)
        xl = int_excel.excel_dict
        self.xl_int1_name = xl['int1_name'][0]
        self.xl_int2_name = xl['int2_name'][0]

        status_excel = excelRead.ExcelRead()
        status_excel.read(inputFile.INPUT_PATH['event_status_change'],
                          index=index)
        xl = status_excel.excel_dict
        self.xl_quick_stage = xl['live_stage'][0]
        self.xl_quick_comment = xl['quick_comment'][0]
        self.xl_quick_message = xl['live_message'][0]
        self.xl_app_name = xl['event_name'][0].format(version)
        self.xl_schedule_status = xl['schedule'][0]

        self.quick_config_collection = []
        self.quick_schedule_collection = []

    def quick_interview_config(self):
        self.quick_config_collection = []
        __list = [
            self.applicant_grid.select_applicant(),
            self.applicant_action.more_action(),
            self.applicant_action.quick_interview_action(),
            self.quick_schedule.select_interviewers_field(),
            self.multi_select.search(self.xl_int1_name),
            self.multi_select.move_all_items(),
            self.multi_select.search_clear(),
            self.multi_select.search(self.xl_int2_name),
            self.multi_select.move_all_items(),
            self.multi_select.done()
        ]
        for func in __list:
            if func:
                self.quick_config_collection.append(func)
            else:
                self.quick_config_collection.append(func)

    def quick_interview_schedule(self):
        self.quick_schedule_collection = []
        __list = [
            self.quick_schedule.select_interviewer_round(self.xl_quick_stage),
            self.quick_schedule.quick_comment(self.xl_quick_comment),
            self.quick_schedule.schedule_quick_interview(),
            self.quick_schedule.quick_schedule_notifier(self.xl_quick_message),
            self.quick_schedule.quick_schedule_notifier_dismiss(),
            self.applicant_grid.applicant_get_name(self.xl_app_name, 1),
            self.getby.candidate_status(self.xl_schedule_status),
            self.switch_window.window_close(),
            self.switch_window.switch_to_window(0)
        ]
        for func in __list:
            if func:
                self.quick_schedule_collection.append(func)
            else:
                self.quick_schedule_collection.append(func)