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)
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 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)
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)
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)
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)
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)
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)