def select_person_card(self, val=None): #证件类型 itemN = self.driver.getElements(self.person_card) if val == None: items = [] for i in itemN: items.append(i.text) items = items[0].split('\n') val = rdData.getListItem(items) #print(items,val) self.driver.selectByText(self.person_card, val)
def select_danger_level(self, val=None): #存放危险等级 itemN = self.driver.getElements(self.danger_level) if val == None: items = [] for i in itemN: items.append(i.text) items = items[0].split('\n') #print(items) val = rdData.getListItem(items) #print(val) self.driver.selectByText(self.danger_level, val)
def select_chemistry_involve_type(self, val=None): #涉及环节 itemN = self.driver.getElements((self.chemistry_involve_type)) if val == None: items = [] for i in itemN: items.append(i.text) #print(items) val = rdData.getListItem(items, len(items) + 1) for i in itemN: if val.count(i.text) > 0: i.click()
def select_logout_type(self,val=None): #注销类型 itemN = self.driver.getElements(self.logou_type) #print(itemN[0]) if val==None: items=[] for i in itemN: items.append(i.text) items=items[0].split('\n') #print(items) val=rdData.getListItem(items) #print(val) self.driver.selectByText(self.logou_type,val)
def select_person_ethnicity(self, val=None): #民族 self.driver.click(self.person_ethnicity) itemN = self.driver.getElements(self.person_ethnicity) if val == None: items = [] for i in itemN: items.append(i.text) items = items[0].split('\n') items.remove('--请选择--') val = rdData.getListItem(items) #print(items,val) self.driver.selectByText(self.person_ethnicity, val)
def select_person_country(self, val=None): #国家/地区 itemN = self.driver.getElements(self.person_country) #print(itemN[0]) if val == None: items = [] for i in itemN: items.append(i.text) items = items[0].split('\n') #print(items) val = rdData.getListItem(items) #print(val) self.driver.selectByText(self.person_country, val)
def select_person_position(self, val=None): #职位/工种 itemN = self.driver.getElements(self.person_position) #print(itemN[0]) if val == None: items = [] for i in itemN: items.append(i.text) items = items[0].split('\n') #print(items) val = rdData.getListItem(items) #print(val) self.driver.selectByText(self.person_position, val)
def select_operating_state(self, val=None): #经营状态 itemN = self.driver.getElements(self.operating_state) #print(self.operating_state,itemN[0]) if val == None: items = [] for i in itemN: items.append(i.text) items = items[0].split('\n') #print(items) val = rdData.getListItem(items) #print(val) self.driver.selectByText(self.operating_state, val)
def select_has_certificate(self, val=None): #有无证照 itemN = self.driver.getElements(self.has_certificate) #print(self.has_certificate,itemN[0]) if val == None: items = [] for i in itemN: items.append(i.text) items = items[0].split('\n') #print(items) val = rdData.getListItem(items) #print(val) self.driver.selectByText(self.has_certificate, val)
def select_person_position(self, val=None): #职位/工种 self.driver.click(self.person_position) self.driver.waitSleep(1) itemN = self.driver.getElements(self.person_position) if val == None: items = [] for i in itemN: items.append(i.text) items = items[0].split('\n') items.remove('--请选择--') val = rdData.getListItem(items) #print(items,val) self.driver.selectByText(self.person_position, val)
def select_place_position(self, val=None): #所属场所 self.driver.click(self.person_place) self.driver.waitSleep(1) itemN = self.driver.getElements(self.person_place_item) if val == None: items = [] for i in itemN: items.append(i.text) val = rdData.getListItem(items) #print(items,val) for i in itemN: if i.text.count(val) > 0: self.driver.waitSleep(1) i.click() return val
def select_industry(self, val=None): self.driver.rightClick(self.industry_list) self.driver.waitSleep(1) itemN = self.driver.getElements(self.industry_list) #print(self.industry_list,itemN) if val == None: items = [] for i in itemN: items.append(i.text) #print(items) val = rdData.getListItem(items) for i in itemN: if i.text.count(val) > 0: self.driver.waitSleep(1) i.click()
def input_product_name(self, val=None): #危化产品 self.driver.click(self.product_name) self.driver.waitSleep(1) itemN = self.driver.getElements(self.product_name_list) self.driver.waitSleep(1) print(itemN) if val == None: items = [] for i in itemN: items.append(i.text) #items=items[0].split('\n') print(items) val = rdData.getListItem(items) print(val) for i in itemN: if i.text.count(val) > 0: i.click()