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 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 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 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 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 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 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, '产品部')
예제 #10
0
 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_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
예제 #12
0
 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, '产品部')