def study_class(self, keyw, cus_status, cus_pri, cus_next_tracking, cus_remark, cus_class_no, cus_payable, cus_deposit, cus_payment, cus_account, time_data): self.ts.send_keywords(keyw) self.ts.click_search() self.click_tracking() self.select_status(cus_status) self.select_priority(cus_pri) self.track_time(cus_next_tracking) self.remark(cus_remark) if Service.wait_present(self.driver, By.ID, 'panel-element-enroll'): class_no = self.driver.find_element_by_xpath( '//div[@id="panel-element-enroll"]/div/div/div[1]/div[1]/select' ) payable = self.driver.find_element_by_xpath( '//div[@id="panel-element-enroll"]/div/div/div[1]/div[2]/select' ) deposit = self.driver.find_element_by_xpath( '//div[@id="panel-element-enroll"]/div/div/div[1]/div[3]/select' ) payment = self.driver.find_element_by_xpath( '//div[@id="panel-element-enroll"]/div/div/div[2]/div[1]/select' ) account = self.driver.find_element_by_xpath( '//div[@id="panel-element-enroll"]/div/div/div[2]/div[2]/select' ) payment_time = 'document.getElementsByName("trade_time")[0].value="%s"' % time_data # jsValue = 'document.getElementById("next_time").value="%s"' % time_data self.driver.execute_script(payment_time) Service.select_by_name(class_no, cus_class_no) Service.select_by_name(payable, cus_payable) Service.select_by_name(deposit, cus_deposit) Service.select_by_name(payment, cus_payment) Service.select_by_name(account, cus_account) self.save() self.driver.refresh()
def select_pooltype(self, pool_name): # Service.miss_login(self.driver,'..\\config\\base.conf') select = self.driver.find_element_by_id('poolSelect') Service.select_by_name(select, pool_name)
def select_source(self, cus_source): source = self.driver.find_element_by_xpath( '//div[@class="modal-body"]/div[5]/div/select') Service.select_by_name(source, cus_source)
def select_channel(self,cus_channel): channel=self.driver.find_element_by_name('source') Service.select_by_name(channel,cus_channel)
def select_status(self, status_name): status = self.driver.find_element_by_id('newStatus') Service.select_by_name(status, status_name)
def select_worker(self, work_name): select = self.driver.find_element_by_css_selector( 'div.col-lg-12:nth-child(8) > select:nth-child(1)') select.click() Service.select_by_name(select, work_name)
def select_source(self,cus_source): source=self.driver.find_element_by_xpath('//form[@id="addCus"]/div/div[5]/div/select') Service.select_by_name(source,cus_source)
def select_grade(self,cus_grade): grade=self.driver.find_element_by_xpath('//form[@id="addCus"]/div/div[3]/div[2]/select') Service.select_by_name(grade,cus_grade)
def select_transmit_region(self, region_name): transmit_region = self.driver.find_element_by_id('regionSelect2') Service.select_by_name(transmit_region, region_name)
def select_source(self, cus_source): source = self.driver.find_element_by_xpath( '//div[@id="content"]/div[2]/div[1]/select[5]') Service.select_by_name(source, cus_source)
def select_status(self, cus_status): status = self.driver.find_element_by_xpath( '//div[@id="content"]/div[2]/div[1]/select[4]') Service.select_by_name(status, cus_status)
def select_origin_emp(self, user_name): emp = self.driver.find_element_by_id('empNameSelect1') Service.select_by_name(emp, user_name)
def select_origin_dept(self, user_dept): dept = self.driver.find_element_by_xpath( '//div[@id="content"]/div[2]/div[1]/select[2]') Service.select_by_name(dept, user_dept)
def select_origin_region(self, cus_region): region = self.driver.find_element_by_id('regionSelect1') Service.select_by_name(region, cus_region)
def abandon_person(self, worker): person = self.driver.find_element_by_xpath( '/html/body/div[8]/div[2]/div/select[3]') Service.select_by_name(person, worker)
def select_sex(self,cus_sex): sex=self.driver.find_element_by_xpath('//form[@id="addCus"]/div/div/div[3]/select') Service.select_by_name(sex,cus_sex)
def select_status(self,cus_status): status=self.driver.find_element_by_xpath('//div[@class="modal-body"]/div[2]/div/select') Service.select_by_name(status,cus_status)
def select_transmit_dept(self, dept_name): transmit_dept = self.driver.find_element_by_id('deptSelect2') Service.select_by_name(transmit_dept, dept_name)
def select_experience(self,experience_name): experience=self.driver.find_element_by_xpath('//form[@id="addCus"]/div/div[4]/div[2]/select') Service.select_by_name(experience,experience_name)
def select_transmit_worker(self, worker_name): transmit_worker = self.driver.find_element_by_id('empNameSelect2') Service.select_by_name(transmit_worker, worker_name)
def select_pooltype(self, pool_name): # Service.miss_login(self.driver,'..\\config\\base.conf') select = self.driver.find_element_by_xpath( '//div[@id="content"]/div[2]/div/select[1]') Service.select_by_name(select, pool_name)
def select_worker(self, work_name): select = self.driver.find_element_by_id('empNameSelect') select.click() Service.select_by_name(select, work_name)
def select_source(self, source_name): select = self.driver.find_element_by_xpath( '//div[@id="content"]/div[2]/div/select[3]') Service.select_by_name(select, source_name)
def select_status(self, status_name): select = self.driver.find_element_by_id('statusSelect') Service.select_by_name(select, status_name)
def select_priority(self, priority_name): priority = self.driver.find_element_by_xpath( '//form[@id="formFollow"]/div/div[2]/select') Service.select_by_name(priority, priority_name)
def select_source(self, source_name): select = self.driver.find_element_by_id('sourceSelect') Service.select_by_name(select, source_name)
def assign_curriculum(self,cus_curriculum): curriculum=self.driver.find_element_by_xpath('//div[@id="content"]/div[2]/div[3]/select') Service.select_by_name(curriculum,cus_curriculum)
def select_grade(self, cus_grade): grade = self.driver.find_element_by_xpath( '//div[@class="modal-body"]/div[3]/div[2]/select') Service.select_by_name(grade, cus_grade)