def query_all(self, base_config_path):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password('..\\config\\base.conf')
     self.market()
     self.click_query_button()
     time.sleep(3)
 def search(self, base_config_path, search_enterprise_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     driver.find_element_by_xpath('/html/body/div[4]/div[2]/a[4]').click()
     time.sleep(6)
     self.input_employee_name(search_enterprise_data['employee'])
     self.click_search()
 def addCus(self, base_config_path, addResModel_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password('..\\config\\base.conf')
     self.market()
     self.click_add_button()
     self.select_cus_region()
     self.select_department()
     self.input_phone(addResModel_data['cus_phone'])
     self.input_name(addResModel_data['cus_name'])
     self.select_sex()
     self.select_last_status()
     self.input_email(addResModel_data['cus_email'])
     self.input_qq(addResModel_data['cus_qq'])
     self.input_school(addResModel_data['cus_school'])
     self.select_education()
     self.input_major(addResModel_data['cus_major'])
     self.input_intent(addResModel_data['cus_intent'])
     self.select_workage()
     self.input_salary(addResModel_data['cus_salary'])
     self.select_source()
     self.input_applposition(addResModel_data['cus_applposition'])
     self.input_age(addResModel_data['cus_age'])
     self.input_eduexp(addResModel_data['cus_eduexp'])
     self.input_experience(addResModel_data['cus_experience'])
     self.input_last_tracking(addResModel_data['cus_last_tracking'])
     self.click_save_button()
 def read_email(self,base_config_path):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password('..\\config\\base.conf')
     self.market()
     self.read_email_button()
     self.read_ok_button()
 def query_week(self, base_config_path):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.click_report()
     self.click_consult()
     self.click_week()
     time.sleep(5)
Example #6
0
 def query_username(self, base_config_path, query_username_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password()
     self.click_management()
     self.click_user()
     self.input_username(query_username_data['username'])
     self.click_user_query()
Example #7
0
 def start(self, base_config_path):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password()
     self.click_management()
     self.click_dictionary()
     self.click_start_button()
     self.click_start_ok_button()
Example #8
0
 def query_console(self, base_config_path, query_console_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.click_report()
     self.click_consult()
     self.input_stime(query_console_data['stime'])
     self.input_etime(query_console_data['etime'])
     self.click_query_button()
Example #9
0
 def decrypt(self, base_config_path, add_password_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     driver.find_element_by_id('abc').click()
     time.sleep(6)
     self.click_decode_button()
     self.input_password(add_password_data['password'])
     self.click_confirm()
Example #10
0
 def edit_res(self, base_config_path, edit_resource_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password()
     self.click_management()
     self.click_menu_button()
     self.click_edit_button()
     self.input_res_name(edit_resource_data['res_name'])
Example #11
0
 def remove_res(self, base_config_path):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password()
     self.click_management()
     self.click_menu_button()
     self.click_remove_button()
     self.click_remove_ok_button()
     self.click_close_button()
 def edit_enterprise(self, base_config_path, edit_enterprise_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     driver.find_element_by_xpath('/html/body/div[4]/div[2]/a[4]').click()
     time.sleep(6)
     self.click_edit()
     self.edit_employee_name(edit_enterprise_data['entName'])
     self.edit_entcate(edit_enterprise_data['entcate'])
     self.click_esave()
 def upload_files(self,base_config_path, upload_files_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password('..\\config\\base.conf')
     self.market()
     self.click_upload_button()
     self.select_region2()
     self.select_dept()
     self.select_files(upload_files_data['files_path'])
Example #14
0
 def qureyNetCus(self, base_config_path, qureyNetCus_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password()
     self.market()
     self.select_region()
     self.select_status()
     self.input_stime(qureyNetCus_data['stime'])
     self.input_etime(qureyNetCus_data['etime'])
     self.click_query_button()
 def change_login_password(self, base_config_path,
                           change_login_password_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password()
     self.click_login_password_button()
     self.input_oldpw(change_login_password_data['oldpw'])
     self.input_newpw1(change_login_password_data['newpw1'])
     self.input_newpw2(change_login_password_data['newpw2'])
     self.click_sure_button()
Example #16
0
 def add_flow(self, base_config_path, add_flow_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     driver.find_element_by_id('abc').click()
     time.sleep(6)
     self.click_add_flow_button()
     self.input_money(add_flow_data['moneyNo'])
     self.input_countparty(add_flow_data['counterpartyName'])
     self.input_record(add_flow_data['textarea'])
     self.click_save_flow()
Example #17
0
 def add_resource(self, base_config_path, add_resource_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password()
     self.click_management()
     self.click_menu_button()
     self.click_tree_button()
     self.click_add_button()
     self.input_name(add_resource_data['res_name'])
     self.input_url(add_resource_data['res_url'])
     self.input_des(add_resource_data['res_des'])
Example #18
0
 def user_set(self, base_config_path, user_set_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password()
     self.click_management()
     self.click_user()
     self.click_user_set()
     self.input_username_role(user_set_data['username_role'])
     self.input_username_des(user_set_data['username_des'])
     self.click_user_save_button()
     self.click_user_close_button()
 def technical_interview(self, base_config_path, technical_interview_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.driver.find_element_by_xpath(
         '/html/body/div[4]/div[2]/a[6]').click()
     time.sleep(6)
     self.click_interview()
     # self.choose_result(technical_interview_data['result'])
     self.input_question(technical_interview_data['question_content'])
     self.input_evalute(technical_interview_data['evalute_content'])
     self.click_save()
Example #20
0
 def edit_role(self, base_config_path, edit_role_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password()
     self.click_management()
     self.click_role()
     self.click_role_edit_button()
     self.input_edit_role_name(edit_role_data['edit_role_name'])
     self.input_edit_role_des(edit_role_data['edit_role_des'])
     self.click_edit_role_save()
     self.click_edit_role_close()
Example #21
0
 def add_role(self, base_config_path, add_role_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password()
     self.click_management()
     self.click_role()
     self.click_add_role_button()
     self.input_add_role_name(add_role_data['add_role_name'])
     self.input_add_role_res(add_role_data['add_role_des'])
     self.click_add_role_save()
     self.click_add_role_ok()
Example #22
0
 def set(self, base_config_path, set_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password()
     self.click_management()
     self.click_menu_button()
     self.click_set_button()
     self.input_role_name(set_data['role_name'])
     self.input_role_des(set_data['role_des'])
     self.click_saveSet()
     self.click_save_close()
Example #23
0
 def test_query_all(self):
     self.market.query_all('..\\config\\base.conf')
     if Service.is_element_present(
             self.driver, By.CSS_SELECTOR,
             '#netCus-table > thead:nth-child(1) > tr:nth-child(1) > th:nth-child(1) > div:nth-child(1)'
     ) or Service.is_element_present(self.driver, By.CSS_SELECTOR,
                                     '.no-records-found > td:nth-child(1)'):
         actual = 'query_successful'
     else:
         actual = 'query_failed'
     # 断言
     self.assertEqual(actual, 'query_successful')
Example #24
0
 def details_edit(self, base_config_path, details_edit_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password()
     self.click_management()
     self.click_dictionary()
     self.click_details()
     self.click_details_edit()
     self.input_dict_typename(details_edit_data['dict_typename'])
     self.input_dict_value1(details_edit_data['dict_value'])
     self.input_dict_sort1(details_edit_data['dict_sort'])
     self.input_dict_remarks1(details_edit_data['dict_remarks'])
     self.click_details_edit_save_button()
 def search_name(self, base_config_path, search_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.driver.find_element_by_xpath(
         '/html/body/div[4]/div[2]/a[6]').click()
     time.sleep(6)
     self.click_job_manage()
     self.click_decode_button()
     self.input_password()
     self.click_confirm()
     self.input_name(search_data['name'])
     self.input_stu_no(search_data['stu_no'])
     self.click_search()
 def mock_interview(self, base_config_path, mock_interview_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.driver.find_element_by_xpath(
         '/html/body/div[4]/div[2]/a[6]').click()
     time.sleep(6)
     self.click_job_manage()
     self.mock()
     self.input_salary(mock_interview_data['salary'])
     self.choose_ability()
     self.input_remark(mock_interview_data['mremark'])
     self.click_save_button()
     driver.switch_to.alert.accept()
Example #27
0
 def dict_add(self, base_config_path, dict_add_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     self.second_password()
     self.click_management()
     self.click_dictionary()
     self.click_dictionary_add_button()
     self.input_dict_value(dict_add_data['dict_value'])
     self.input_dict_key(dict_add_data['dict_key'])
     self.input_dict_sort(dict_add_data['dict_sort'])
     self.input_dict_remarks(dict_add_data['dict_remarks'])
     self.click_dict_save_button()
     self.click_dict_close_button()
 def add_enterprise(self, base_config_path, add_enterprise_data):
     driver = self.driver
     Service.miss_login(driver, base_config_path)
     driver.find_element_by_xpath('/html/body/div[4]/div[2]/a[4]').click()
     time.sleep(6)
     self.click_add_enterprise()
     self.input_entname(add_enterprise_data['newentname'])
     self.input_entcate(add_enterprise_data['newentcate'])
     self.input_address(add_enterprise_data['address'])
     self.input_header(add_enterprise_data['header'])
     self.input_number(add_enterprise_data['phonenumber'])
     self.input_main(add_enterprise_data['e_mail'])
     self.input_qq(add_enterprise_data['qq'])
     self.click_add()
     driver.switch_to.alert.accept()
 def test_addCus(self, cus_phone,cus_name, cus_email, cus_qq,cus_school,cus_major,cus_intent,cus_salary,cus_applposition,cus_age,cus_eduexp,cus_experience,cus_last_tracking,expect):
     addResModel_data={'cus_phone':cus_phone,'cus_name':cus_name,'cus_email':cus_email,'cus_qq':cus_qq,
                       'cus_school':cus_school,'cus_major':cus_major,'cus_intent':cus_intent,'cus_salary':cus_salary,
                       'cus_applposition': cus_applposition, 'cus_age': cus_age,'cus_eduexp':cus_eduexp,'cus_experience':cus_experience,
                       'cus_last_tracking': cus_last_tracking}
     self.market.addCus('..\\config\\base.conf', addResModel_data)
     if Service.is_element_present(self.driver,By.CSS_SELECTOR,'div.bootbox-body').text=='保存成功,但邮件未发送成功':
         actual='add_failed'
     elif Service.is_element_present(self.driver,By.CSS_SELECTOR,'div.bootbox-body').text=='程序出错':
         actual='add_failed'
     elif Service.is_element_present(self.driver,By.CSS_SELECTOR,'div.bootbox-body').text=='该资源已存在于系统中,请填写上最后跟踪记录点击保存':
         actual = 'add_failed'
     else:
         actual='add_successful'
     #断言
     self.assertEqual(actual,expect)
    def test_technical_interview(self, q_content, e_content, expect):
        technical_interview_data = {
            'question_content': q_content,
            'evalute_content': e_content
        }
        # 执行技术面试的操作
        self.employ.technical_interview('..\\config\\base.conf',
                                        technical_interview_data)

        if Service.is_element_present(
                self.driver, By.CSS_SELECTOR,
                '.bootbox > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > h4:nth-child(2)'
        ):
            time.sleep(2)
            content = self.driver.find_element_by_css_selector(
                '.bootbox-body').text
            if '不能为空' in content:
                actual = 'interview_fail'
                self.driver.find_element_by_xpath(
                    '/html/body/div[11]/div/div/div[3]/button').click()
            else:
                actual = 'interview_success'
                self.driver.find_element_by_xpath(
                    '/html/body/div[11]/div/div/div[3]/button').click()
        else:
            contents = self.driver.find_element_by_css_selector(
                '#skill_table > tbody:nth-child(2) > tr:nth-child(1) > td:nth-child(1)'
            ).text
            if '无符合条件' in contents:
                actual = 'interview_fail'
            else:
                actual = 'interview_success'
        self.assertEqual(actual, expect)