コード例 #1
0
    def job_ec_task_configuration(self):
        time.sleep(2)
        self.driver.execute_script("window.scrollTo(0,-200);")
        self.getby_details_screen(self.job_name_sprint_version)
        if self.header_name.strip() == self.job_name_sprint_version:
            print(
                '**-------->>> Job EC and Task configuring to job:: {}'.format(
                    self.job_name_sprint_version))
            try:
                self.sub_tab('job_configuration_tab')
                self.ui_job_configure_tab = 'Pass'

                self.web_element_click_xpath(
                    page_elements.job_config['ec_configure'])

                time.sleep(2)
                self.web_element_send_keys_xpath(
                    page_elements.text_fields['text_field'].format(
                        'Select Eligibility Criteria'),
                    self.xl_eligibility_criteria)
                self.drop_down_selection()

                self.web_element_send_keys_xpath(
                    page_elements.text_fields['text_field'].format(
                        'Select Stage'), self.xl_ec_stage)
                self.drop_down_selection()

                self.web_element_send_keys_xpath(
                    page_elements.text_fields['text_field'].format(
                        'Select status'), self.xl_positive_status)
                self.drop_down_selection()

                self.web_element_send_keys_xpath(
                    page_elements.job_config['ec_negative_stage'],
                    self.xl_ec_stage)
                self.drop_down_selection()

                self.web_element_send_keys_xpath(
                    page_elements.job_config['ec_negative_status'],
                    self.xl_negative_status)
                self.drop_down_selection()

                time.sleep(0.5)
                button_click.button(self, 'Save')
                print('**-------->>> Eligibility configuration done')
                self.ui_ec_configure = 'Pass'

                # ---------------------- Task configuration ------------------------------------------------------------
                self.task_config(
                    page_elements.job_config['task_configure'],
                    page_elements.text_fields['text_field'].format(
                        'Select Event'), self.job_name_sprint_version,
                    self.xl_assign_stage_status,
                    self.xl_positive_stage_status_job,
                    self.xl_negative_stage_status_job, self.xl_A1)
                if self.task_configure_success == 'Pass':
                    self.ui_task_configure = 'Pass'

            except Exception as config_message:
                ui_logger.error(config_message)
コード例 #2
0
    def applicant_schedule_status_change(self, stage, status, comment):
        try:
            # --------------------------- Change Applicant Status to Schedule ------------------------------------------
            self.driver.execute_script("window.scrollTo(0,-100);")

            self.web_element_click_id(
                page_elements.applicant_actions['Change_applicant_status'])
            time.sleep(6)
            self.web_element_send_keys_xpath(
                page_elements.change_applicant_status['change_stage'], stage)
            self.web_element_send_keys_xpath(
                page_elements.change_applicant_status['change_status'], status)
            self.web_element_click_xpath(
                page_elements.change_applicant_status['Interviewer'])
            self.web_element_click_xpath(
                page_elements.multi_selection_box['moveAllItemsRight'])
            self.web_element_click_xpath(
                page_elements.
                change_applicant_status['Interviewer_selection_done'])
            self.web_element_send_keys_xpath(
                page_elements.change_applicant_status['comment'], comment)
            time.sleep(4)
            button_click.button(self, 'Change')

            self.applicant_schedule_statuschange = 'True'

        except Exception as e:
            ui_logger.error(e)
コード例 #3
0
    def event_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_3)
            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['event_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['event'])
            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['event_users'])
            self.multi_selection_search(self.xl_user_3)
            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['event_sla'], self.xl_sla_3)
            button_click.button(self, 'Save')

# validation ----
            self.glowing_messages('Configuration saved successfully')
            if self.message_validation == 'True':
                self.ui_event_config = 'Pass'
                self.dismiss_message()
                time.sleep(1.5)

        except Exception as error:
            ui_logger.error(error)
コード例 #4
0
    def event_owner_configure(self):
        self.getby_details_screen(self.event_sprint_version)
        if self.header_name.strip() == self.event_sprint_version:
            print('**-------->>> Event Validated and continuing '
                  'with owner configuration to created event :: {}'.format(
                      self.event_sprint_version))
            try:
                self.sub_tab('event_owner_tab')
                self.ui_event_owners_tab = 'Pass'

                button_click.button(self, 'Edit')
                self.ui_owner_edit_action = 'Pass'

                self.web_element_click_xpath(
                    page_elements.multi_selection_box['moveAllItemsRight'])

                self.driver.execute_script("window.scrollTo(0,200);")
                button_click.button(self, 'Update')

                print('**-------->>> Event Owners has been added')
                self.ui_event_owner_config = 'Pass'
                time.sleep(1)

            except Exception as error:
                ui_logger.error(error)
                print('Failed to configure Event Owners <<<--------**')
コード例 #5
0
    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)
コード例 #6
0
    def tag_applicants_to_job_test(self):
        try:
            self.message_validation = ''
            # ----------------------------- Tag applicants ---------------------
            self.web_element_click_id(
                page_elements.applicant_actions['tag_applicants'])
            time.sleep(2)
            self.web_element_send_keys_xpath(
                page_elements.text_fields['text_field'].format(
                    'Select a JobRole'), self.event_sprint_version_a)
            self.drop_down_selection()
            self.web_element_click_xpath(page_elements.grid['test_required'])
            self.web_element_send_keys_xpath(
                page_elements.text_fields['text_field'].format('Select Test'),
                self.event_sprint_version_a)
            self.drop_down_selection()
            button_click.button(self, 'Tag')
            self.glowing_messages('All Applicant(s) tagged successfully')
            self.dismiss_message()

            # -------------------- output report value ----------------
            if self.message_validation == 'True':
                self.ui_tag_applicant_ae = 'Pass'
        except Exception as e:
            ui_logger.error(e)
コード例 #7
0
ファイル: edit_job.py プロジェクト: Vinod-E/UI-Automation
    def edit_job(self):
        self.driver.execute_script("window.scrollTo(0,-200);")
        self.getby_details_screen(self.job_name_sprint_version)
        if self.header_name.strip() == self.job_name_sprint_version:
            print('**-------->>> Edit job functionality to job:: {}'.format(
                self.job_name_sprint_version))

            try:
                self.actions_dropdown()
                time.sleep(0.5)
                self.floating_action('job_edit')
                self.ui_job_edit_action = 'Pass'

                self.web_element_send_keys_xpath(
                    page_elements.job['description_box'], self.j_description_u)
                time.sleep(2)
                button_click.button(self, 'Update')

                image_capture.screen_shot(self, 'Update_Job')

                # ------------------------ Validation ------------------------------------------------------------------
                self.job_search_flow()
                if self.header_name.strip() == self.job_name_sprint_version:
                    print('**-------->>> Job Edit/update successfully')
                    self.ui_update_job = 'Pass'

            except Exception as error:
                ui_logger.error(error)
コード例 #8
0
    def re_registration_link(self):
        try:
            self.message_validation = ''
            time.sleep(0.5)
            self.applicant_name_search(self._applicant_name, 'Applicant grid')
            time.sleep(0.5)
            self.more_actions()
            # ----------------------------- Change BU ------------------------------
            applicant_actions.action(self, 'Enable Re-Registration')
            self.web_element_send_keys_xpath(
                page_elements.text_fields['text_field'].format('Reason'),
                self.xl_enable_link_a)
            self.drop_down_selection()
            self.web_element_send_keys_xpath(
                page_elements.event_applicant['comment'], self.xl_comment_a)
            button_click.button(self, 'Send')
            self.glowing_messages(
                'Re-Registration has been enabled for this user')
            self.dismiss_message()

            # -------------------- output report value ----------------
            if self.message_validation == 'True':
                self.ui_re_registration_link_ae = 'Pass'
        except Exception as e:
            ui_logger.error(e)
コード例 #9
0
    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)
コード例 #10
0
    def upload_attachment(self):
        try:
            self.message_validation = ''
            time.sleep(1)
            self.more_actions()
            # ----------------------------- Upload attachment ------------------------------
            applicant_actions.action(self, 'Upload Attachment')
            self.web_element_send_keys_xpath(page_elements.file['upload_file'],
                                             self.attachment)
            time.sleep(1)
            self.glowing_messages('File uploaded successfully')
            time.sleep(1.5)
            self.dismiss_message()
            time.sleep(0.5)
            self.web_element_click_xpath(page_elements.buttons['save'])
            self.message_validation = ''
            time.sleep(1)
            self.glowing_messages('Attachment Upload Successfully')
            self.dismiss_message()
            time.sleep(0.5)
            button_click.button(self, 'Close')

            # -------------------- output report value ----------------
            if self.message_validation == 'True':
                self.ui_upload_attachment_ae = 'Pass'

        except Exception as e:
            ui_logger.error(e)
コード例 #11
0
    def invite_video_interview(self):
        try:
            if self.lobby_cid.strip() == str(self.candidate_id_m):
                button_click.button(self, 'Invite Candidate & Go to Interview')
                print(
                    '**-------->>> Invite Candidate & Go to Interview successfully'
                )
                time.sleep(2)
                self.web_element_click_xpath(
                    page_elements.mass_interview['declare'])
                time.sleep(0.5)
                button_click.button(self, 'Proceed To Interview')
                time.sleep(2)
                self.driver.switch_to.window(self.driver.window_handles[1])
                try:
                    self.web_element(By.TAG_NAME, 'h4')
                    print(self.text_value)
                    if self.text_value == 'Online Proctoring Setup':
                        print('**-------->>> Landed in Video Proctoring page')
                        self.ui_invite_candidate_action = 'Pass'
                        self.ui_invited_candidate_to_VC = 'Pass'
                        self.ui_validate_video_proctor_page = 'Pass'
                except Exception as error:
                    ui_logger.error(error)

                self.driver.close()
                time.sleep(5)
                self.driver.switch_to.window(self.driver.window_handles[0])
        except Exception as error:
            ui_logger.error(error)
コード例 #12
0
    def submit_feedback_int1(self):
        try:
            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);")

            self.web_element_send_keys_xpath(
                page_elements.new_interview['overall'], 'INT1')

            button_click.button(self, 'Submit Feedback')
            button_click.button(self, 'Agree and Submit')
            time.sleep(5)

            self.driver.switch_to.window(self.driver.window_handles[0])
            self.driver.refresh()
            time.sleep(0.5)
            self.submit_feed_validation(self.xl_int1)

            # -------------------- output report values ----------------
            self.ui_provide_feedback_action_n_int1 = 'Pass'

        except Exception as error:
            ui_logger.error(error)
コード例 #13
0
    def job_applicant_name_search(self, job_name):

        self.web_element_send_keys_name(
            page_elements.advance_search['job_applicant_name'], job_name)
        time.sleep(1.5)
        button_click.button(self, 'Search')
        print('**-------->>> {} advance search is working'.format(job_name))
        self.job_search = 'True'
コード例 #14
0
    def interview_re_schedule(self):
        try:
            # --------------------------- New tab to login as interviewer ---------------------------------------------
            time.sleep(0.5)
            self.crpo_logout()
            self.login('InterviewerONE', self.xl_username_int1_o,
                       self.xl_password_int1_o)

            # ----------------------- Reschedule Process --------------------------------------------------------------
            self.advance_search(page_elements.tabs['event_tab'])
            self.name_search(self.event_sprint_version_o, 'Event')
            self.event_getby_name()
            self.event_validation('reschedule process',
                                  self.event_sprint_version_o)
            self.actions_dropdown()
            self.floating_action('event_interviews')

            time.sleep(0.5)
            self.check_box()

            self.web_element_click_id(page_elements.grid_actions['reschedule'])
            time.sleep(3)
            self.web_element_send_keys_xpath(
                page_elements.interview['comments'],
                self.xl_cancel_reschedule_comment_o)
            time.sleep(1)
            button_click.button(self, 'Reschedule')

            time.sleep(1)
            self.applicant_getby_name(self.event_sprint_version_o)
            self.driver.switch_to.window(self.driver.window_handles[1])

            # ------- Validation check -----------------------
            self.current_status_validation('Rescheduled')
            if self.applicant_current_status.strip() == 'Rescheduled':
                print(
                    '**-------->>> Interview re-schedule happened successfully'
                )

                # -------------------- output report values ----------------
                self.ui_event_tab_r = 'Pass'
                self.ui_advance_search_r = 'Pass'
                self.ui_event_details_r = 'Pass'
                self.ui_event_validation_r = 'Pass'
                self.ui_floating_action_r = 'Pass'
                self.ui_event_interviews_action = 'Pass'
                self.ui_grid_reschedule_action = 'Pass'
                self.ui_reschedule = 'Pass'
                self.ui_candidate_getby_r = 'Pass'
                self.ui_change_applicant_status = 'Pass'

            time.sleep(1.2)
            self.driver.close()
            self.driver.switch_to.window(self.driver.window_handles[0])

        except Exception as reschedule:
            ui_logger.error(reschedule)
コード例 #15
0
ファイル: create_job.py プロジェクト: Vinod-E/UI-Automation
    def create_job_role(self):
        try:
            self.job_tab()
            time.sleep(2)
            self.web_element_click_xpath(page_elements.buttons['create'])
            self.web_element_send_keys_xpath(page_elements.text_fields['text_field'].format("Name"),
                                             self.job_name_sprint_version)
            self.web_element_send_keys_xpath(page_elements.file['upload_file'],
                                             self.job_desc_file)
            self.web_element_send_keys_xpath(page_elements.job['description_box'],
                                             self.xl_job_desc)
            self.web_element_send_keys_xpath(page_elements.job['location'],
                                             self.xl_job_loc)
            self.drop_down_selection()
            self.web_element_send_keys_xpath(page_elements.job['hiring_manager'],
                                             self.xl_job_hm)
            self.drop_down_selection()
            self.web_element_send_keys_xpath(page_elements.job['business_unit'],
                                             self.xl_job_bu)
            self.drop_down_selection()

            self.driver.find_element_by_name(page_elements.job['openings']).clear()
            self.web_element_send_keys_name(page_elements.job['openings'],
                                            self.xl_openings)
            self.web_element_send_keys_name(page_elements.job['max_applicant'],
                                            self.xl_openings)

            self.driver.find_element_by_xpath(page_elements.job['male_diversity']).clear()
            self.web_element_send_keys_xpath(page_elements.job['male_diversity'],
                                             self.xl_male_diversity)

            self.driver.find_element_by_xpath(page_elements.job['female_diversity']).clear()
            self.web_element_send_keys_xpath(page_elements.job['female_diversity'],
                                             self.xl_female_diversity)

            button_click.button(self, 'Create')

            self.dismiss_message()
            self.driver.execute_script("window.scrollTo(0,-200);")
            time.sleep(3)

        except Exception as create_job:
            ui_logger.error(create_job)
            image_capture.screen_shot(self, 'Job')

# --------- Create job validation check
        self.getby_details_screen(self.job_name_sprint_version)
        if self.header_name == self.job_name_sprint_version:
            image_capture.screen_shot(self, 'Job_created')
            self.ui_job_validation = 'Pass'
            self.ui_job_created = 'Pass'
            print('**-------->>> Job Created successfully')
            print('**-------->>> Job Validated and continuing '
                  'with the created job :: {}'.format(self.header_name))
        else:
            print('Job creation failed Or Job validation failed<<<--------**')
コード例 #16
0
 def view_test_status(self):
     try:
         self.more_actions()
         # ----------------------------- Test status ---------------------
         applicant_actions.action(self, 'View Test Status')
         button_click.button(self, 'Ok')
         # -------------------- output report value ----------------
         self.ui_view_test_status_ae = 'Pass'
     except Exception as e:
         ui_logger.error(e)
コード例 #17
0
    def config_selection_process(self):
        # ---------------------------------- From Job details screen ---------------------------------------------------
        self.getby_details_screen(self.job_name_sprint_version)
        if self.header_name == self.job_name_sprint_version:
            print('**-------->>> Selection process configuring to job:: {}'.
                  format(self.job_name_sprint_version))
            try:
                # ------------------------------------ Selection Process -----------------------------------------------
                time.sleep(0.5)
                self.driver.execute_script("window.scrollTo(0,-200);")
                self.actions_dropdown()
                self.floating_action('selection_process')
                self.ui_job_floating_action = 'Pass'
                self.ui_selection_process_action = 'Pass'

                time.sleep(2)
                self.web_element_send_keys_xpath(
                    page_elements.text_fields['text_field'].format(
                        "Selection Process"), self.xl_selection_process)
                self.drop_down_selection()

                time.sleep(0.5)
                self.driver.execute_script("window.scrollTo(0,200);")
                button_click.button(self, 'Save')
                self.dismiss_message()

                self.selection_process_created = 'Pass'

            except Exception as config_message:
                ui_logger.error(config_message)

        if self.selection_process_created == 'Pass':
            print('**-------->>> Selection Process configured successfully')
        else:
            try:
                # ------------------------------------ Selection Process -----------------------------------------------
                self.driver.refresh()
                self.driver.implicitly_wait(3)
                self.actions_dropdown()
                self.floating_action('selection_process')
                self.ui_job_floating_action = 'Pass'
                self.ui_selection_process_action = 'Pass'

                self.web_element_send_keys_xpath(
                    page_elements.text_fields['text_field'].format(
                        "Selection Process"), self.xl_selection_process)
                self.drop_down_selection()

                time.sleep(1)
                self.driver.execute_script("window.scrollTo(0,100);")
                button_click.button(self, 'Save')
                self.dismiss_message()

            except Exception as config_message:
                ui_logger.error(config_message)
コード例 #18
0
 def applicant_json(self):
     try:
         self.more_actions()
         # ----------------------------- Applicant json ------------------------------
         applicant_actions.action(self, 'View Applicant Json')
         button_click.button(self, 'Cancel')
         # -------------------- output report value ----------------
         self.ui_view_applicant_json_ae = 'Pass'
         print('Message/UI notifier validated - Applicant Json verified')
     except Exception as e:
         ui_logger.error(e)
コード例 #19
0
 def compare_id_card(self):
     try:
         self.more_actions()
         # ----------------------------- Compare Id card ----------------------------
         applicant_actions.action(self, 'Compare Id Card')
         button_click.button(self, 'Close')
         # -------------------- output report value ----------------
         self.ui_compare_id_ae = 'Pass'
         print('Message/UI notifier validated - Compare Id verified')
     except Exception as e:
         ui_logger.error(e)
コード例 #20
0
    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)
コード例 #21
0
    def assessment_name_search(self, name, where_search_is_happening):
        try:

            self.web_element_send_keys_name(
                page_elements.advance_search['assessment_name'], name)
            button_click.button(self, 'Search')
            print('**-------->>> {} advance search is working'.format(
                where_search_is_happening))
            self.search = 'Pass'

        except Exception as search:
            ui_logger.error(search)
コード例 #22
0
    def candidate_login_page(self, message):
        if message == 'msg1':
            message_ele = page_elements.mass_interview['candidate_msg1']
            text_value = 'Almost there! You are next in queue'
        elif message == 'msg2':
            message_ele = page_elements.mass_interview['candidate_msg2']
            text_value = 'Please wait to be queued'
        elif message == 'msg3':
            message_ele = page_elements.mass_interview['candidate_msg3']
            text_value = 'It’s your turn for the interview'
        elif message == 'msg4':
            message_ele = page_elements.mass_interview['candidate_msg1']
            text_value = 'Almost there! You are next in queue'
        try:
            self.driver.execute_script("window.open('');")
            # Switch to the new window
            self.driver.switch_to.window(self.driver.window_handles[1])
            self.driver.get(self.candidate_login_link)
            # self.driver.get('https://ams.hirepro.in/interviewLobby/#/crpoqa/interview/?candidate=961494&h=$2a$12$codc4vW7CMhUYEtjji/iZOUFwEQmEqLBpmTsksPa2Q3Z.cvQEwYk2&event=3812')
            time.sleep(3)
            # ------------------- Enter into Room -------------------------------
            self.web_element_send_keys_xpath(
                page_elements.text_fields['text_field'].format('Enter Candidate Id'), self.candidate_id_m)
            time.sleep(0.5)
            button_click.button(self, 'Enter the room')

            self.web_element_text_xpath(message_ele)
            if message == 'msg1':
                if self.text_value.strip() == text_value:
                    self.ui_c_msg1 = 'Pass'
                    self.ui_c_message_1 = self.text_value.strip()
                    print('**-------->>> Successfully logged into Candidate page')
            elif message == 'msg2':
                if self.text_value.strip() == text_value:
                    self.ui_c_msg2 = 'Pass'
                    self.ui_c_message_2 = self.text_value.strip()
                    print('**-------->>> Successfully logged into Candidate page')
            elif message == 'msg3':
                if self.text_value.strip() == text_value:
                    self.ui_c_msg3 = 'Pass'
                    self.ui_c_message_3 = self.text_value.strip()
                    print('**-------->>> Successfully logged into Candidate page')
            else:
                if self.text_value.strip() == text_value:
                    self.ui_c_msg4 = 'Pass'
                    self.ui_c_message_4 = 'Your Interview is finished'
                    print('**-------->>> Successfully logged into Candidate page')
            time.sleep(4)
            self.driver.close()
            self.driver.switch_to.window(self.driver.window_handles[0])

        except Exception as e:
            ui_logger.error(e)
コード例 #23
0
 def job_view_test_status(self):
     try:
         time.sleep(0.3)
         self.job_more_actions()
         # ----------------------------- Test status ---------------------
         applicant_actions.action(self, 'View Test Status')
         time.sleep(0.3)
         button_click.button(self, 'Ok')
         # -------------------- output report value ----------------
         self.ui_view_test_status_aj = 'Pass'
     except Exception as e:
         ui_logger.error(e)
コード例 #24
0
    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)
コード例 #25
0
    def cancel_interview_request(self):
        try:
            # ---------------------------- New tab to login as interviewer ---------------------------------------------
            time.sleep(0.5)
            self.crpo_logout()
            self.login('InterviewerTWO', self.xl_username_int2_o,
                       self.xl_password_int2_o)
            # ----------------------- cancel request Process -----------------------------------------------------------
            time.sleep(3)
            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 process',
                                  self.event_sprint_version_o)
            self.actions_dropdown()
            self.floating_action('event_interviews')

            time.sleep(0.5)
            self.check_box()
            self.web_element_click_id(
                page_elements.grid_actions['cancel_interview_request'])

            time.sleep(1.5)
            self.web_element_send_keys_xpath(
                page_elements.text_fields['text_field'].format('Reason'),
                self.xl_cancel_request_reason_o)
            time.sleep(1)
            self.drop_down_selection()

            self.web_element_send_keys_xpath(
                page_elements.interview['comment'],
                self.xl_cancel_request_comment_o)
            time.sleep(2)
            button_click.button(self, 'Save')
            time.sleep(0.5)
            self.dismiss_message()

            # -------------------- output report values ----------------
            self.ui_event_tab_cr = 'Pass'
            self.ui_advance_search_cr = 'Pass'
            self.ui_event_details_cr = 'Pass'
            self.ui_event_validation_cr = 'Pass'
            self.ui_floating_action_cr = 'Pass'
            self.ui_event_interviews_action_cr = 'Pass'
            self.ui_cancel_request_action = 'Pass'
            self.ui_cancel_request_raise = 'Pass'

        except Exception as cancel_request:
            ui_logger.error(cancel_request)
コード例 #26
0
    def name_search(self, name, where_search_is_happening):
        try:

            self.web_element_send_keys_name(
                page_elements.advance_search['name'], name)
            time.sleep(1)
            self.driver.execute_script("window.scrollTo(0,100);")
            time.sleep(1)
            button_click.button(self, 'Search')
            print('**-------->>> {} advance search is working'.format(
                where_search_is_happening))
            self.search = 'Pass'

        except Exception as search:
            ui_logger.error(search)
コード例 #27
0
    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)
コード例 #28
0
    def live_schedule(self):
        try:
            # --------------------------- Advance search ---------------------------------------------------------------
            self.advance_search(page_elements.tabs['event_tab'])
            self.name_search(self.event_sprint_version_l, 'Event')
            self.event_getby_name()

            self.driver.execute_script("window.scrollTo(0,-200);")
            self.getby_details_screen(self.event_sprint_version_l)
            if self.header_name == self.event_sprint_version_l:
                print('**-------->>> Event Validated and continuing '
                      'with live-interview-schedule to created event :: {}'.format(self.get_event_name.strip()))
            self.actions_dropdown()
            self.floating_action('live_interview')

# ---------- Validation
            time.sleep(6)
            self.live_screen_validation()

            self.web_element_click_xpath(page_elements.buckets['select_interview_stage'].format(self.stage1_l))
            self.web_element_send_keys_xpath(page_elements.text_fields['text_field'].format('Candidate Name'),
                                             self.event_sprint_version_l)
            self.web_element_click_xpath(page_elements.buttons['live_applicant_search'])

            time.sleep(1)
            self.all_check_box_unlock()
            button_click.button(self, 'Schedule Selected')

            self.web_element_click_xpath(page_elements.live_interview['int1_select'])
            self.web_element_click_xpath(page_elements.live_interview['int2_select'])
            button_click.button(self, ' Schedule')

            # -------------------- output report values ----------------
            if self.header_name.strip() == self.event_sprint_version_l:
                self.ui_event_tab_li = 'Pass'
                self.ui_advance_search_li = 'Pass'
                self.ui_event_details_li = 'Pass'
                self.ui_event_validation_li = 'Pass'
                self.ui_floating_action_li = 'Pass'
                self.ui_live_interviews_action_li = 'Pass'

            if self.event_sprint_version_l in self.event_name_in_live:
                self.ui_live_interview_validation = 'Pass'
                self.ui_live_schedule = 'Pass'
                self.ui_provide_feedback_button = 'Pass'

        except Exception as e:
            ui_logger.error(e)
コード例 #29
0
ファイル: reply_query.py プロジェクト: Vinod-E/UI-Automation
    def job_config_reply(self):
        try:
            self.staff_login(self.xl_login_2, self.xl_password_he, self.user_2)
            self.web_element_click_xpath(page_elements.title['title'].format(
                self.category_2))
            time.sleep(1)
            self.web_element_send_keys_xpath(
                page_elements.text_fields['text_field'].format(
                    'Your message here...'), self.category_2)
            self.web_element_click_xpath(
                page_elements.title['title'].format('Reply'))

            # ------ In progress module
            time.sleep(0.5)
            self.web_element_send_keys_xpath(
                page_elements.help_desk['open/inprogress/close'],
                'In Progress')
            self.web_element_click_xpath(page_elements.title['title'].format(
                self.category_2))
            self.web_element_text_xpath(page_elements.title['title'].format(
                self.category_2))  # ------ text
            time.sleep(0.5)
            self.web_element_send_keys_xpath(
                page_elements.text_fields['text_field'].format(
                    'Your message here...'), self.category_2)
            button_click.button(self, 'Mark as Closed')
            button_click.button(self, 'OK')
            time.sleep(2)

            # ------ Validation
            if self.staff_logging == 'True':
                self.ui_helpdesk_user2 = 'Pass'

            if self.text_value == self.category_2:
                self.ui_query_choosen_2 = 'Pass'
                self.ui_query_reply_2 = 'Pass'
                self.ui_inprogress_query_choosen_2 = 'Pass'
                self.ui_inprogress_query_reply_2 = 'Pass'

            time.sleep(2)
            self.web_element_text_xpath(
                page_elements.help_desk['total_records'])
            if '0' in self.text_value:
                self.ui_query_close_2 = 'Pass'

        except Exception as job:
            ui_logger.error(job)
コード例 #30
0
    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)