def smart_alert(self): '''智能提示选择框查询''' qp = QueryFormPage(self.driver) qp.smart_alert_selectquery(2) self.wait_loading_hide() # 等待视图的loading消失 sa = qp.find_elems('#dataTable .listDataTr td:nth-child(12)') return self.judge_search_content_inlist(sa, 'aa')
def left_right_selection(self): '''左右选择框查询''' qp = QueryFormPage(self.driver) qp.left_right_selection_selectquery(2) self.wait_loading_hide() # 等待视图的loading消失 lrs = qp.find_elems('#dataTable .listDataTr td:nth-child(11)') return self.judge_search_content_inlist(lrs, '广州')
def user_selection(self): '''用户选择框查询''' qp = QueryFormPage(self.driver) qp.user_selection_selectquery(2) self.wait_loading_hide() # 等待视图的loading消失 us = qp.find_elems('#dataTable .listDataTr td:nth-child(10)') return self.judge_search_content_inlist(us, '李玲')
def tree_department_selection(self): '''树形部门选择框查询''' qp = QueryFormPage(self.driver) qp.tree_department_selection_selectquery(2) self.wait_loading_hide() # 等待视图的loading消失 ds = qp.find_elems('#dataTable .listDataTr td:nth-child(9)') return self.judge_search_content_inlist(ds, '产品部')
def multiline_textbox(self): '''多行文本框查询''' qp = QueryFormPage(self.driver) qp.multiline_textbox_inputquery('test1', 2) self.wait_loading_hide() # 等待视图的loading消失 mts = qp.find_elems('#dataTable .listDataTr td:nth-child(3)') return self.judge_search_content_inlist(mts, 'test1')
def multiselect(self): '''多选框查询''' qp = QueryFormPage(self.driver) qp.multiselect_selectquery(1) self.wait_loading_hide() # 等待loading消失 gv = qp.find_elem('.leftPanel div.label') return gv.text == '任务2'
def multiselect(self): '''多选框查询''' qp = QueryFormPage(self.driver) qp.multiselect_selectquery(1) self.wait_loading_hide() dv = qp.find_elem('#cal14') return dv.text == '14'
def date_selection(self): '''日期选择框查询''' qp = QueryFormPage(self.driver) qp.date_selection_selectquery('2017-07-10', 1) self.wait_loading_hide() dv = qp.find_elem('#cal14') return dv.text == '14'
def tree_department_selection(self): '''树形部门选择框查询''' qp = QueryFormPage(self.driver) qp.tree_department_selection_selectquery(1) self.wait_loading_hide() dv = qp.find_elem('#cal14') return dv.text == '14'
def left_right_selection(self): '''左右选择框查询''' qp = QueryFormPage(self.driver) qp.left_right_selection_selectquery(1) self.wait_loading_hide() # 等待loading消失 gv = qp.find_elem('.leftPanel div.label') return gv.text == '任务2'
def drop_down(self): '''下拉框查询''' qp = QueryFormPage(self.driver) qp.drop_down_selectquery(1) self.wait_loading_hide() dv = qp.find_elem('#cal14') return dv.text == '14'
def radio(self): '''单选框查询''' qp = QueryFormPage(self.driver) qp.radio_selectquery(1) self.wait_loading_hide() dv = qp.find_elem('#cal14') return dv.text == '14'
def radio(self): '''单选框查询''' qp = QueryFormPage(self.driver) qp.radio_selectquery(2) self.wait_loading_hide() # 等待视图的loading消失 rds = qp.find_elems('#dataTable .listDataTr td:nth-child(4)') return self.judge_search_content_inlist(rds, '男')
def user_selection(self): '''用户选择框查询''' qp = QueryFormPage(self.driver) qp.open_fold_query(2) qp.find_elem_is_clickable( '#searchFormTable tr:nth-child(5)>td:nth-child(2)>span>span' ).click() self.switch_to_div_iframe() #time.sleep(0.5) qp.find_elem_visible('div.list_div[title="员工"]').click() #time.sleep(0.5) qp.find_elem_is_clickable('.list_div_click').click() #time.sleep(0.5) qp.find_elem_visible('#doReturn').click() #time.sleep(0.5) self.switch_to_parent() self.switch_to_iframe() self.switch_to_right_iframe() #time.sleep(0.5) self.view_scroll_to('400') qp.find_elem_visible('#searchFormTable .btn-primary').click() self.wait_loading_hide() #time.sleep(0.5) us = qp.find_elems('#dataTable .listDataTr td:nth-child(10)') return self.judge_search_content_inlist(us, '李玲')
def multiline_textbox(self): '''多行文本框查询''' qp = QueryFormPage(self.driver) qp.multiline_textbox_inputquery('test4', 1) self.wait_loading_hide() dv = qp.find_elem('#cal14') return dv.text == '14'
def smart_alert(self): '''智能提示选择框查询''' qp = QueryFormPage(self.driver) qp.smart_alert_selectquery(1) self.wait_loading_hide() # 等待loading消失 gv = qp.find_elem('.leftPanel div.label') return gv.text == '任务2'
def multiline_textbox_reset(self): '''多行文本框重置设置''' qp = QueryFormPage(self.driver) qp.multiline_textbox_reset_inputquery('60',1) #多行文本框重置输入查询 self.wait_loading_hide() # 等待loading消失 gv = qp.find_elem('.leftPanel div.label') return gv.text == '任务'
def date_selection(self): '''日期选择框查询''' qp = QueryFormPage(self.driver) qp.date_selection_selectquery('2018-02-04', 2) self.wait_loading_hide() # 等待视图的loading消失 ds = qp.find_elems('#dataTable .listDataTr td:nth-child(7)') return self.judge_search_content_inlist(ds, '2018-02-04')
def drop_down(self): '''下拉框查询''' qp = QueryFormPage(self.driver) qp.drop_down_selectquery(2) self.wait_loading_hide() # 等待视图的loading消失 dd = qp.find_elems('#dataTable .listDataTr td:nth-child(6)') return self.judge_search_content_inlist(dd, '广州')
def multiselect(self): '''多选框查询''' qp = QueryFormPage(self.driver) qp.multiselect_selectquery(2) self.wait_loading_hide() # 等待视图的loading消失 ms = qp.find_elems('#dataTable .listDataTr td:nth-child(5)') return self.judge_search_content_inlist(ms, '苹果')
def left_right_selection(self): '''左右选择框查询''' qp = QueryFormPage(self.driver) qp.left_right_selection_selectquery(1) self.wait_loading_hide() dv = qp.find_elem('#cal14') return dv.text == '14'
def drop_down(self): '''下拉框查询''' qp = QueryFormPage(self.driver) qp.drop_down_selectquery(1) self.wait_loading_hide() # 等待loading消失 gv = qp.find_elem('.leftPanel div.label') return gv.text == '任务2'
def smart_alert(self): '''智能提示选择框查询''' qp = QueryFormPage(self.driver) qp.smart_alert_selectquery(1) self.wait_loading_hide() dv = qp.find_elem('#cal10') return dv.text == '10'
def date_selection(self): '''日期选择框查询''' qp = QueryFormPage(self.driver) qp.date_selection_selectquery('2017-07-01',1) self.wait_loading_hide() # 等待loading消失 gv = qp.find_elem('.leftPanel div.label') return gv.text == '任务2'
def multiline_textbox_reset(self): '''多行文本框重置设置''' qp = QueryFormPage(self.driver) qp.multiline_textbox_reset_inputquery('test4', 1) self.wait_loading_hide() gv = qp.find_elem('#cal14') return 'test1' in gv.text
def tree_department_selection(self): '''树形部门选择框查询''' qp = QueryFormPage(self.driver) qp.tree_department_selection_selectquery(1) self.wait_loading_hide() # 等待loading消失 gv = qp.find_elem('.leftPanel div.label') return gv.text == '任务2'
def multiline_textbox_reset(self): '''多行文本框重置设置''' qp = QueryFormPage(self.driver) qp.multiline_textbox_reset_inputquery('test1', 2) self.wait_loading_hide() # 等待视图的loading消失 mts = qp.find_elems('#dataTable .listDataTr td:nth-child(3)') x = [] for mt in mts: x.append(mt.text) return 'test2test2' in x
def tree_department_selection(self): '''树形部门选择框查询''' qp = QueryFormPage(self.driver) qp.open_fold_query(2) #点击高级查询 qp.find_elem_visible('.btn-default[title="请选择"]').click() #点击添加树形部门按钮 self.switch_to_div_iframe() #time.sleep(0.5) qp.find_elem_visible( '.wtree-dept >div > .wtree-adron').click() #点击展开顶级部门 qp.find_elem_visible( '#deplist li li:nth-child(2) input').click() #点击勾选第二个部门 qp.find_elem_visible('#btn-save').click() qp.wait_elem_disappear('#btn-save') self.switch_to_parent() self.switch_to_iframe() self.switch_to_right_iframe() self.view_scroll_to('400') #time.sleep(0.5) qp.find_elem_visible('#searchFormTable .btn-primary').click() self.wait_loading_hide() ds = qp.find_elems('#dataTable .listDataTr td:nth-child(9)') return self.judge_search_content_inlist(ds, '产品部')