def default_configuration(self): try: self.driver.execute_script("window.scrollTo(0,100);") self.web_element_click_xpath(page_elements.help_desk['category']) self.multi_selection_search(self.xl_category_1) self.web_element_click_xpath(page_elements.multi_selection_box['moveAllItemsRight']) button_click.all_buttons(self, 'Done') self.web_element_click_xpath(page_elements.help_desk['user']) self.multi_selection_search(self.xl_user_1) self.web_element_click_xpath(page_elements.multi_selection_box['moveAllItemsRight']) button_click.all_buttons(self, 'Done') self.web_element_send_keys_xpath(page_elements.help_desk['sla'], self.xl_sla_1) button_click.button(self, 'Save') time.sleep(0.5) # validation ---- self.glowing_messages('Configuration saved successfully') if self.message_validation == 'True': self.ui_default_config = 'Pass' self.dismiss_message() time.sleep(1.5) except Exception as error: ui_logger.error(error)
def invite_interviewers_config(self): try: self.skill_1() time.sleep(1) self.web_element_click_xpath( page_elements.manage_interviews['add_criteria']) self.skill_2() self.driver.execute_script("window.scrollTo(0,-200);") self.web_element_click_xpath( page_elements.buttons['save_invite_int']) time.sleep(0.5) self.web_element_click_xpath(page_elements.buttons['send_mail']) for i in range(0, 3): button_click.all_buttons(self, 'OK') time.sleep(1) self.glowing_messages( 'Mail will be sent to all interviewers fulfilling the criteria' ) time.sleep(0.3) if self.message_validation == 'True': self.skill1_configured = 'Pass' self.skill2_configured = 'Pass' self.nomination_on_off = 'Pass' self.send_mail_to_interviewers = 'Pass' print( '**-------->>> Nomination mail sent to interviewers successfully' ) except Exception as error: ui_logger.error(error)
def approve_sync(self): try: self.web_element_click_xpath(page_elements.buttons['clear_refresh']) time.sleep(2) self.web_element_click_xpath(page_elements.grid['all']) button_click.button(self, 'Actions') button_click.all_buttons(self, 'Approve') self.web_element_text_xpath(page_elements.title['title'].format('Approved')) if self.text_value == 'Approved': self.ui_clear_search = 'Pass' self.ui_approve_action = 'Pass' self.ui_approved = 'Pass' self.ui_em_request_validated = 'Pass' print('**-------->>> Event Manager - {}'.format(self.text_value)) time.sleep(1) self.web_element_click_xpath(page_elements.title['title'].format('This will sync interviewers for' ' whom you have accepted nomination with ' 'the event owners')) self.glowing_messages('Interviewers have been successfully synced to event.') if self.message_validation == 'True': self.ui_sync_interviewers = 'Pass' except Exception as error: ui_logger.error(error)
def manage_candidate(self): try: button_click.all_buttons(self, 'Manage Candidates') self.manage_candidate_validation(self.xl_to_be_Queued[0]) # -------------------- output report values ---------------- if self.candidate_interview_status == self.xl_interview_pending[0]: self.ui_configure_slot_tab_m = 'Pass' self.ui_stage_search_m = 'Pass' self.ui_slot_creation_m = 'Pass' self.ui_slot_data_filled_m = 'Pass' self.ui_assign_slot_m = 'Pass' self.ui_communicate_slot_m = 'Pass' self.ui_search_slot_applicant_m = 'Pass' self.ui_interview_lobby_action_m = 'Pass' self.ui_open_lobby_link_m = 'Pass' self.ui_candidate_id_enter_m = 'Pass' self.ui_enter_room_action_m = 'Pass' self.ui_entered_candidate_login_m = 'Pass' self.ui_assign_room_action_m = 'Pass' self.ui_tag_room_m = 'Pass' self.candidate_interview_status_m = 'Pass' self.candidate_interview_status_t_m = 'Pass' except Exception as error: ui_logger.error(error)
def live_provide_feedback(self, decision, comment): try: time.sleep(1) self.web_element_click_xpath(page_elements.live_interview['provide_feedback']) time.sleep(5) self.driver.switch_to.window(self.driver.window_handles[1]) self.web_element_click_xpath(decision) self.web_element_send_keys_xpath(page_elements.interview['rating_1'], 'Develop') self.web_element_send_keys_xpath(page_elements.interview['comment_1'], comment) self.web_element_send_keys_xpath(page_elements.interview['rating_2'], 'Develop') self.web_element_send_keys_xpath(page_elements.interview['comment_2'], comment) self.web_element_send_keys_xpath(page_elements.interview['overall_comment'], comment) if self.is_behalf_int == 1: button_click.all_buttons(self, self.xl_int1_name[0]) button_click.all_buttons(self, self.xl_int2_name[0]) # ------ Submitted time.sleep(1) button_click.all_buttons(self, 'Submit Feedback') self.driver.execute_script("window.scrollTo(0,200);") time.sleep(0.3) button_click.all_buttons(self, 'Agree and Submit') button_click.all_buttons(self, 'Agree and Submit') time.sleep(5) self.driver.switch_to.window(self.driver.window_handles[0]) except Exception as error: ui_logger.error(error)
def requirement_configuration_tab(self): self.getby_details_screen(self.requirement_sprint_version) if self.header_name.strip() == self.requirement_sprint_version: print('**-------->>> Req Validated and continuing ' 'with the configuration to :: {}'.format( self.requirement_sprint_version)) try: time.sleep(0.5) self.sub_tab('req_configuration_tab') self.ui_req_config_tab = 'Pass' self.sub_tab('req_duplicity_check') self.ui_req_duplicity_tab = 'Pass' time.sleep(0.5) button_click.all_buttons(self, 'Dont Allow') # ----------------------------------- Validation ----------------------------------------------------------- self.web_element_text_xpath( page_elements.buttons['all_buttons'].format('Dont Allow')) self.dont_allow = self.text_value if self.dont_allow.strip() == 'Dont Allow': print('**-------->>> Duplicity check configured') self.ui_req_duplicity = 'Pass' else: print('Failed to configure duplicity check <<<--------**') # ---------------------------------------------------------------------------------------------------------- self.driver.execute_script("window.scrollTo(0,-100);") self.requirement_search() except Exception as config_message: ui_logger.error(config_message)
def create_requirement(self): try: self.driver.refresh() time.sleep(2) self.requirement_tab() self.web_element_click_xpath(page_elements.buttons['create']) self.web_element_send_keys_xpath( page_elements.text_fields['text_field'].format("Name"), self.requirement_sprint_version) time.sleep(0.2) self.web_element_click_xpath( page_elements.requirement['job_selection_field']) self.web_element_send_keys_xpath( page_elements.text_fields['text_field'].format("Search"), self.job_sprint_version) time.sleep(2) self.web_element_click_xpath( page_elements.multi_selection_box['moveAllItemsRight']) button_click.all_buttons(self, 'Done') self.web_element_send_keys_xpath( page_elements.text_fields['text_field'].format("Hiring Type"), self.xl_hiring_track) self.drop_down_selection() self.web_element_send_keys_xpath( page_elements.text_fields['text_field'].format("College Type"), self.xl_college_type) self.drop_down_selection() button_click.button(self, ' Create') time.sleep(1) self.driver.execute_script("window.scrollTo(0,-100);") image_capture.screen_shot(self, 'Requirement_created') # -------------------------------- Validation -------------------------------------------------------------- self.getby_details_screen(self.requirement_sprint_version) if self.header_name.strip() == self.requirement_sprint_version: print('**-------->>> Requirement created successfully ') print('**-------->>> Req Validated and continuing ' 'with the created requirement :: {}'.format( self.requirement_sprint_version)) self.ui_create_requirement = 'Pass' self.ui_requirement_validation = 'Pass' else: print('Failed to create Requirement <<<--------**') except Exception as create_req: ui_logger.error(create_req)
def task_config(self, configure_button, event_or_job, name, assign_stage, positive_stage, negative_stage, activity): try: self.driver.refresh() time.sleep(4) self.web_element_click_xpath(configure_button) self.web_element_click_xpath( page_elements.job_config['new_task_row']) self.web_element_send_keys_xpath(event_or_job, name) self.drop_down_selection() self.web_element_send_keys_xpath( page_elements.text_fields['text_field'].format( 'Select Stage And Status'), assign_stage) self.drop_down_selection() self.web_element_send_keys_xpath( page_elements.text_fields['text_field'].format( 'Select Positive Stage - Status'), positive_stage) self.drop_down_selection() self.web_element_send_keys_xpath( page_elements.text_fields['text_field'].format( 'Select Negative Stage - Status'), negative_stage) self.drop_down_selection() self.web_element_send_keys_xpath( page_elements.text_fields['text_field'].format( 'Select Activity'), activity) self.drop_down_selection() self.web_element_click_xpath( page_elements.job_config['Task_selection']) self.web_element_click_xpath( page_elements.multi_selection_box['moveAllItemsRight']) button_click.all_buttons(self, 'Done') button_click.button(self, 'Save') print('**-------->>> Task configuration done for {}'.format(name)) self.task_configure_success = 'Pass' time.sleep(1.7) except Exception as config_message: ui_logger.error(config_message)
def mass_feedback(self): try: time.sleep(1) button_click.all_buttons(self, 'Provide Feedback') time.sleep(3) self.driver.switch_to.window(self.driver.window_handles[1]) self.web_element_click_xpath(page_elements.interview['shortlist']) self.web_element_send_keys_xpath( page_elements.interview['rating_1'], 'Develop') self.web_element_send_keys_xpath( page_elements.interview['comment_1'], self.xl_comment_m) self.web_element_send_keys_xpath( page_elements.interview['rating_2'], 'Develop') self.web_element_send_keys_xpath( page_elements.interview['comment_2'], self.xl_comment_m) self.web_element_send_keys_xpath( page_elements.interview['overall_comment'], self.xl_comment_m) # ------ Submitted time.sleep(1) self.driver.execute_script("window.scrollTo(0,200);") button_click.all_buttons(self, 'Submit Feedback') time.sleep(0.3) button_click.all_buttons(self, 'Agree and Submit') button_click.all_buttons(self, 'Agree and Submit') time.sleep(9) self.driver.switch_to.window(self.driver.window_handles[0]) except Exception as error: ui_logger.error(error)
def view_registration_link(self): try: self.message_validation = '' self.more_actions() # ----------------------------- View Registration Link ---------------------------- applicant_actions.action(self, 'View Registration Link') button_click.all_buttons(self, 'COPY') self.glowing_messages('Registration link copied') self.dismiss_message() # -------------------- output report value ---------------- if self.message_validation == 'True': self.ui_view_registration_link_ae = 'Pass' except Exception as e: ui_logger.error(e)
def unlock_feedback_form(self): try: # ---------------------------- New tab to login as Interviewer --------------------------------------------- self.crpo_logout() self.login('Admin', self.xl_username, self.xl_password) # -------------------------------- unlock feedback form ------------------------------------------------- time.sleep(5) self.advance_search(page_elements.tabs['event_tab']) self.name_search(self.event_sprint_version_o, 'Event') self.event_getby_name() self.event_validation('unlock feedback form', self.event_sprint_version_o) self.actions_dropdown() self.floating_action('event_interviews') time.sleep(0.5) self.web_element_click_xpath(page_elements.buckets['all_interviews']) self.web_element_click_xpath(page_elements.buckets['completed_interviews']) self.web_element_click_id(page_elements.grid_actions['refresh']) self.check_box() self.web_element_click_id(page_elements.grid_actions['unlock_feedback']) self.all_check_box_unlock() time.sleep(0.5) button_click.click_button(self, "'", 'unlockFeedback', "'") self.web_element_send_keys_xpath(page_elements.interview['c_r_comment'], self.xl_update_feedback_comment_o) button_click.all_buttons(self, 'OK') time.sleep(0.5) self.dismiss_message() time.sleep(0.5) button_click.button(self, 'Close') # -------------------- output report values ---------------- self.ui_event_tab_un = 'Pass' self.ui_advance_search_un = 'Pass' self.ui_event_details_un = 'Pass' self.ui_event_validation_un = 'Pass' self.ui_floating_action_un = 'Pass' self.ui_event_interviews_action_un = 'Pass' self.ui_all_interviews_bucket_un = 'Pass' self.ui_all_completed_bucket_un = 'Pass' self.ui_unlock_feedback_action = 'Pass' except Exception as error: ui_logger.error(error)
def fill_registration(self): try: self.more_actions() # ----------------------------- View Registration Link ---------------------------- applicant_actions.action(self, 'View Registration Link') self.web_element_click_xpath( page_elements.event_applicant['open_RL_new_tab']) self.driver.switch_to.window(self.driver.window_handles[1]) self.web_element_click_id(page_elements.microSite['yes']) self.web_element_click_id(page_elements.microSite['declaration']) self.web_element_click_id(page_elements.microSite['submit']) self.driver.close() self.driver.switch_to.window(self.driver.window_handles[0]) button_click.all_buttons(self, 'CANCEL') except Exception as e: ui_logger.error(e)
def registration_link(self): try: self.message_validation = '' self.more_actions() # ----------------------------- Registration Link --------------------- applicant_actions.action(self, 'Send Registration Link') button_click.all_buttons(self, 'OK') self.glowing_messages( 'Registration-Link successfully sent to applicants(s)') self.dismiss_message() # -------------------- output report value ---------------- if self.message_validation == 'True': self.ui_send_registration_link_ae = 'Pass' except Exception as e: ui_logger.error(e)
def job_copy_registration_link(self): try: self.message_validation = '' self.check_box() # ----------------------------- View Registration Link ---------------------------- self.web_element_click_id( page_elements.applicant_actions['copy_registration_link']) button_click.all_buttons(self, 'COPY') self.glowing_messages('Registration link copied') self.dismiss_message() # -------------------- output report value ---------------- if self.message_validation == 'True': self.ui_view_registration_link_aj = 'Pass' except Exception as e: ui_logger.error(e)
def un_tag_requirement(self): self.getby_details_screen(self.job_name_sprint_version) if self.header_name.strip() == self.job_name_sprint_version: print('**-------->>> Un-Tagging requirement to job:: {}'.format(self.job_name_sprint_version)) try: self.driver.refresh() time.sleep(2) self.actions_dropdown() self.floating_action('un-tag_requirement') self.ui_un_tag_requirement_action = 'Pass' button_click.all_buttons(self, 'OK') print('**-------->>> Job un-tag to requirement successfully') self.ui_un_tag_requirement = 'Pass' except Exception as error: ui_logger.error(error)
def admit_card(self): try: self.message_validation = '' self.more_actions() # ----------------------------- Admit Card ------------------------------ applicant_actions.action(self, 'Send Admit Card') button_click.button(self, 'Send') button_click.all_buttons(self, 'OK') self.glowing_messages( 'Admit-Card successfully sent to applicants(s)') self.dismiss_message() # -------------------- output report value ---------------- if self.message_validation == 'True': self.ui_send_admit_card_ae = 'Pass' except Exception as e: ui_logger.error(e)
def feedback_form(self, interview_stage, template): try: # -------------------------- Interview stage / feedback form configuration ----------------------------- self.driver.find_element_by_xpath( page_elements.text_fields['text_field'].format( "Interview Stages")).clear() time.sleep(1.5) self.web_element_send_keys_xpath( page_elements.text_fields['text_field'].format( "Interview Stages"), interview_stage) time.sleep(1) self.drop_down_selection() time.sleep(1) self.web_element_send_keys_xpath( page_elements.text_fields['text_field'].format("Name like."), template) self.web_element_click_xpath( page_elements.buttons['template-search']) self.driver.execute_script("window.scrollTo(0,200);") time.sleep(0.5) button_click.all_buttons(self, 'Use') self.web_element_click_xpath( page_elements.job_config['template_comment']) self.web_element_click_xpath( page_elements.job_config['template_reject']) self.driver.execute_script("window.scrollTo(0,300);") time.sleep(0.5) button_click.button(self, 'Save') # --------------- For validation check --------------- self.feedback_form_config_flag = 'Pass' self.driver.execute_script("window.scrollTo(0,-200);") print( '**-------->>> {} feedbackForm configured successfully'.format( interview_stage)) except Exception as error: ui_logger.error(error)
def email_mobile_verification_link(self): try: self.message_validation = '' time.sleep(0.2) self.job_more_actions() # ----------------------------- Single PDF ------------------------------ applicant_actions.action(self, 'Send Email-Mobile Verification Link') button_click.all_buttons(self, 'OK') self.glowing_messages('Email Sent Successfully') self.dismiss_message() # -------------------- output report value ---------------- if self.message_validation == 'True': self.ui_email_mobile_aj = 'Pass' except Exception as e: ui_logger.error(e)
def download_resume(self): try: self.message_validation = '' time.sleep(1) self.more_actions() # ----------------------------- Download Resume ------------------------------ applicant_actions.action(self, 'Download Applicant Resume') time.sleep(0.5) button_click.all_buttons(self, 'OK') self.glowing_messages('Resume will be download in background') self.dismiss_message() # -------------------- output report value ---------------- if self.message_validation == 'True': self.ui_download_resume_ae = 'Pass' except Exception as e: ui_logger.error(e)
def untag_candidate_to_room(self): try: self.web_element_click_xpath( page_elements.title['tooltip'].format("'Unassign Room'")) time.sleep(3) button_click.all_buttons(self, 'OK') time.sleep(0.2) button_click.all_buttons(self, 'OK') if self.check_exists_element( By.XPATH, page_elements.title['tooltip'].format("'Assign Room'")): print('**-------->>> Unassigned to room successfully') self.ui_tagged_room = 'Pass' self.ui_unassigned_room = 'Pass' self.ui_unassigned_room_action = 'Pass' self.ui_validation_check_unassigned = 'Pass' except Exception as error: ui_logger.error(error)
def job_untag_applicant(self): try: self.message_validation = '' time.sleep(0.3) # ----------------------------- Untag applicants --------------------- self.web_element_click_id( page_elements.applicant_actions['untag_applicants']) button_click.all_buttons(self, 'OK') self.glowing_messages( 'Unable to untag candidate, beacuse candidate is moved in the Event and Job' ) self.dismiss_message() # -------------------- output report value ---------------- if self.message_validation == 'True': self.ui_untag_applicant_aj = 'Pass' except Exception as e: ui_logger.error(e)
def nomination_int2(self): try: self.interviewer_acceptance(self.xl_user2_mi, self.xl_user2_mi) time.sleep(1) # -------------------- output report values ---------------- if self.header_name.strip() == self.event_sprint_version_mi: self.ui_event_tab_mi_int2 = 'Pass' self.ui_advance_search_mi_int2 = 'Pass' self.ui_event_details_mi_int2 = 'Pass' self.ui_event_validation_mi_int2 = 'Pass' self.web_element_click_xpath(page_elements.tabs['nomination_tab']) time.sleep(1) self.web_element_text_xpath(page_elements.title['title'].format( self.event_sprint_version_mi)) if self.text_value == self.event_sprint_version_mi: self.ui_nomination_tab_int2 = 'Pass' self.ui_request_validation_int2 = 'Pass' print( '**-------->>> Entered into Nomination tab with interviewer1' ) print( '**-------->>> Request validated with sent by event manger' ) time.sleep(0.3) self.web_element_text_xpath( page_elements.manage_interviews['skill_validate']) if self.skill2 in self.text_value: self.ui_skill_request_int2 = 'Pass' button_click.button(self, 'Confirm') button_click.all_buttons(self, 'OK') time.sleep(0.3) self.driver.refresh() time.sleep(2) self.web_element_text_xpath( page_elements.manage_interviews['no_invitation_message']) if self.text_value == "You don't have any nomination requests": self.ui_request_accepted_int2 = 'Pass' except Exception as error: ui_logger.error(error)
def tag_candidate_to_room(self): try: self.web_element_click_xpath( page_elements.title['tooltip'].format("'Assign Room'")) time.sleep(3) self.web_element_send_keys_xpath( page_elements.text_fields['text_field'].format('Room Name'), self.event_sprint_version_m) time.sleep(1.5) self.drop_down_selection() time.sleep(1) button_click.click_button(self, "'", 'assignCandidateToRoom', "'") time.sleep(0.5) button_click.all_buttons(self, 'OK') time.sleep(1) self.manage_candidate_validation(self.xl_interview_pending[0]) except Exception as error: ui_logger.error(error)
def cancel_request_acceptance(self): try: # ---------------------------- New tab to login as Admin --------------------------------------------- self.crpo_logout() self.login('Admin', self.xl_username, self.xl_password) # ----------------------- cancel request Process ----------------------------------------------------------- time.sleep(5) self.advance_search(page_elements.tabs['event_tab']) self.name_search(self.event_sprint_version_o, 'Event') self.event_getby_name() self.event_validation('cancel request acceptance process', self.event_sprint_version_o) self.web_element_click_xpath(page_elements.tabs['event_tracking']) button_click.all_buttons(self, 'Interview Cancel Request') # --- validation check -------- self.cancel_request_validation() # ------------------------------ self.x_path_element_webdriver_wait( page_elements.interview['approve'].format('Approve Request')) self.xpath.click() self.x_path_element_webdriver_wait( page_elements.interview['c_r_comment']) self.xpath.send_keys(self.xl_cancel_request_comment_o) button_click.all_buttons(self, 'OK') # -------------------- output report values ---------------- if self.cancel_reason.strip() == self.reason: self.ui_event_tab_cr_a = 'Pass' self.ui_advance_search_cr_a = 'Pass' self.ui_event_details_cr_a = 'Pass' self.ui_event_validation_cr_a = 'Pass' self.ui_tracking_tab = 'Pass' self.ui_cancel_request_sub_tab = 'Pass' self.ui_request_validation = 'Pass' self.ui_approve = 'Pass' except Exception as acceptance_error: ui_logger.error(acceptance_error)
def disable_link_validation(self): # ----------------------------- View Registration Link ---------------------------- applicant_actions.action(self, 'View Registration Link') # ----------------------------- link --------------------- self.web_element_click_xpath( page_elements.event_applicant['open_RL_new_tab']) self.driver.switch_to.window(self.driver.window_handles[1]) time.sleep(2) self.web_element_text_xpath( page_elements.microSite['micro_site_page_closed']) if self.text_value.strip() == "Registration Closed/Expired": self.disable_link_validation_check = 'True' print('**-------->>> link is validated by 404 page :: {}'.format( "Registration Closed/Expired")) else: print('Something else is wrong with the link <<<---------**') self.driver.close() self.driver.switch_to.window(self.driver.window_handles[0]) button_click.all_buttons(self, 'CANCEL') time.sleep(2)
def enable_link_validation(self, event_name): # ----------------------------- View Registration Link ---------------------------- applicant_actions.action(self, 'View Registration Link') # ----------------------------- link --------------------- self.web_element_click_xpath( page_elements.event_applicant['open_RL_new_tab']) self.driver.switch_to.window(self.driver.window_handles[1]) time.sleep(2) self.web_element_text_xpath( page_elements.microSite['micro_site_campus_details']) if self.text_value == event_name: self.enable_link_validation_check = 'True' print('**-------->>> link is validated by event name :: {}'.format( self.text_value)) else: print('Something else is wrong with the link <<<---------**') self.driver.close() self.driver.switch_to.window(self.driver.window_handles[0]) button_click.all_buttons(self, 'CANCEL') time.sleep(2)
def slot_config(self): try: self.web_element_click_xpath(page_elements.title['title'].format('Current Status')) self.web_element_send_keys_xpath(page_elements.text_fields['text_field'].format('Search'), self.xl_stage_m) self.web_element_click_xpath(page_elements.multi_selection_box['moveAllItemsRight']) button_click.all_buttons(self, 'Done') button_click.button(self, 'Go') print('**-------->>> Stage/Status search for slot configure successfully') time.sleep(1) self.web_element_send_keys_xpath(page_elements.text_fields['text_number']. format('No. Of Slots'), str(self.xl_size_m)) button_click.button(self, 'Go') print('**-------->>> Number of slots configured successfully') time.sleep(0.9) self.web_element_send_keys_xpath(page_elements.text_fields['place_holder'].format('From Date'), self.current_date) self.web_element_send_keys_xpath(page_elements.text_fields['text_number']. format('Count'), str(self.xl_size_m)) self.clear(page_elements.text_fields['place_holder'].format('From Time')) self.web_element_send_keys_xpath(page_elements.text_fields['place_holder'].format('From Time'), self.time) print('**-------->>> Date/Time/Size entered in the fields') time.sleep(1) self.web_element_click_xpath(page_elements.title['tooltip'].format("'"'Assign slots'"'")) print('**-------->>> Assigned the slot to candidate successfully') time.sleep(1) button_click.all_buttons(self, 'OK') time.sleep(0.5) button_click.all_buttons(self, 'OK') print('**-------->>> Communicate the slot mail to candidate successfully') except Exception as e: ui_logger.error(e)
def job_configuration(self): try: self.web_element_click_xpath(page_elements.help_desk['category']) self.multi_selection_search(self.xl_category_2) self.web_element_click_xpath(page_elements.multi_selection_box['moveAllItemsRight']) button_click.all_buttons(self, 'Done') self.web_element_click_xpath(page_elements.help_desk['job']) self.multi_selection_search(self.requirement_sprint_version) self.web_element_click_xpath(page_elements.multi_selection_box['moveAllItemsRight']) button_click.all_buttons(self, 'Done') self.web_element_click_xpath(page_elements.help_desk['job_users']) self.multi_selection_search(self.xl_user_2) self.web_element_click_xpath(page_elements.multi_selection_box['moveAllItemsRight']) button_click.all_buttons(self, 'Done') self.web_element_send_keys_xpath(page_elements.help_desk['job_sla'], self.xl_sla_2) button_click.button(self, 'Save') # validation ---- self.glowing_messages('Configuration saved successfully') if self.message_validation == 'True': self.ui_job_config = 'Pass' self.dismiss_message() time.sleep(1.5) except Exception as error: ui_logger.error(error)
def feedback_configuration(self): try: # --------- job process self.job_search_new() self.actions_dropdown() self.floating_action('feedback_form') self.ui_floating_action_n = 'Pass' self.ui_feedback_form_action_n = 'Pass' # ---------- Configure new feedback self.clear(page_elements.text_fields['text_field'].format( "Interview Stages")) self.web_element_send_keys_xpath( page_elements.text_fields['text_field'].format( "Interview Stages"), self.xl_stage_n) self.drop_down_selection() time.sleep(1) self.web_element_send_keys_xpath( page_elements.text_fields['text_field'].format("Name like."), self.xl_new_form) time.sleep(1) self.web_element_click_xpath( page_elements.buttons['button_click'].format( "'", 'search', "'")) self.driver.execute_script("window.scrollTo(0,100);") time.sleep(0.5) button_click.all_buttons(self, 'Use') # time.sleep(0.5) # self.dismiss_message() time.sleep(0.5) self.feedback_form_validation() except Exception as error: ui_logger.error(error)
def partial_feedback(self): try: time.sleep(5) self.web_element_click_id(page_elements.grid_actions['provide_feedback']) time.sleep(5) self.driver.switch_to.window(self.driver.window_handles[1]) self.driver.execute_script("window.scrollTo(0,200);") time.sleep(1) self.web_element_click_xpath(page_elements.buttons['partial_submission']) self.driver.execute_script("window.scrollTo(0,200);") time.sleep(1) button_click.all_buttons(self, 'Agree and Submit') # ----------- validation self.draft_validation_check = 'True' if self.draft_validation_check == 'True': print('**-------->>> Feedback draft is saved successfully') print('**-------->>> Partial feedback submitted successfully') time.sleep(0.5) self.driver.switch_to.window(self.driver.window_handles[0]) self.partial_bucket() if self.partial_bucket_validation == 'True': print('**-------->>> Feedback submitted from partial bucket successfully') # -------------------- output report values ---------------- self.ui_provide_feedback_action_p = 'Pass' self.ui_partial_submission = 'Pass' self.ui_draft_validation = 'Pass' self.ui_partial_bucket = 'Pass' self.ui_provide_feedback_action_p_f = 'Pass' self.ui_submit_feedback_p_f = 'Pass' self.driver.switch_to.window(self.driver.window_handles[0]) except Exception as error: ui_logger.error(error)