def test_column_type_submit(self): '''列-操作类型-提交流程''' menu3 = '列表视图_列_操作类型_提交流程' self.open_menu3(menu3) lp = ListViewPage(self.driver) if lp.get_rows_total() == 0: lp.add_one_row() if lp.get_rows_total() >= 1: lp.delete_record() lp.add_one_row() lp.click_submit() #点击视图的流程提交按钮 mp = MainPage(self.driver) mp.switch_to_parent() mp.wait_elem_visible('div.aui_content') #等待动画弹框显示 lp.set_val_and_submit('请审批') #设置提交审批意见并确定提交 mp.switch_to_iframe() mp.wait_loading_hide() #等待loading加载完 #点击行数据 lp.click_row() bp = ButtonPage(self.driver) fp = FormPage(self.driver) self.assertEqual(0, fp.get_nextids(), msg='列-操作类型-提交流程检验不通过')
def test_column_type_del(self): '''列-操作类型-删除''' menu3 = '列表视图_列_操作类型_删除' self.open_menu3(menu3) lp = ListViewPage(self.driver) if lp.get_rows_total() == 0: lp.add_one_row() if lp.get_rows_total() == 1: lp.click_del() #time.sleep(0.5) self.assertEqual(0, lp.get_rows_total(), msg='列-操作类型-删除检验不通过')