示例#1
0
    def edit_job(self):

        self.job_validation('edit action')
        if self.job_name_breadcumb == self.job_name_sprint_version:
            try:
                self.floating_action()

                time.sleep(1)
                self.web_element_click_xpath(
                    page_elements.floating_actions['job_edit'])
                self.ui_job_edit_action = 'Pass'

                time.sleep(0.5)
                self.web_element_send_keys_xpath(
                    page_elements.job['description_box'], self.j_description_u)

                time.sleep(1)
                self.web_element_click_xpath(page_elements.buttons['update'])

                image_capture.screen_shot(self, 'Update_Job')

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

            except Exception as error:
                api_logger.error(error)
示例#2
0
    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)
示例#3
0
    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<<<--------**')
    def create_job_role(self):
        try:
            self.job_tab()
            time.sleep(2.5)
            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_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)

            self.web_element_click_xpath(page_elements.buttons['create-save'])

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

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

        self.job_validation('the job')
        if self.job_name_breadcumb == self.job_name_sprint_version:
            self.ui_job_created = 'Pass'
            print('**-------->>> Job Created successfully')
        else:
            print('**-------->>> Job Created Failed')
示例#5
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)

            self.web_element_click_xpath(
                page_elements.requirement['particular_job_select'])

            self.web_element_click_xpath(page_elements.buttons['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()

            self.web_element_click_xpath(
                page_elements.buttons['requirement_create'])

            time.sleep(1)
            self.driver.execute_script("window.scrollTo(0,-100);")
            image_capture.screen_shot(self, 'Requirement_created')

            # -------------------------------- Validation --------------------------------------------------------------
            self.requirement_validation('the requirement')
            if self.req_name_breadcumb == self.requirement_sprint_version:
                print('**-------->>> Requirement created successfully ')
                self.ui_create_requirement = 'Pass'
            else:
                print('Failed to create Requirement <<<--------**')

        except Exception as create_req:
            api_logger.error(create_req)
示例#6
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)
    def job_validation(self, config_name):
        try:
            self.web_element_text_xpath(
                page_elements.job_validations['job_name_breadcumb'])
            self.job_name_breadcumb = self.text_value
        except Exception as e1:
            api_logger.error(e1)

        if self.job_name_breadcumb == self.job_name_sprint_version:
            image_capture.screen_shot(self, 'Job_created')
            self.ui_job_validation = 'Pass'
            print('**-------->>> Job Validated and continuing '
                  'with {} to created job :: {}'.format(
                      config_name, self.job_name_breadcumb))
        else:
            print('Job validation failed Or Job creation failed <<<--------**')
示例#8
0
    def login_of_candidate(self, username, password):
        try:
            time.sleep(3)
            self.candidate_server()
            self.name_element_webdriver_wait(page_elements.embrace_login['username'])
            self.name.send_keys(username)
            self.name_element_webdriver_wait(page_elements.embrace_login['password'])
            self.name.send_keys(password)
            self.x_path_element_webdriver_wait(page_elements.login['login_button'])
            self.xpath.click()

            time.sleep(3)
            image_capture.screen_shot(self, 'Candidate_login_successfully')
            self.candidate_login_validation()

        except Exception as login_failed:
            ui_logger.error(login_failed)