def test_delete_grid_all_rows(self): '''全选记录删除''' menu3 = '网格视图_按钮操作' self.open_menu3(menu3) grid_view = GridViewPage(self.driver) if grid_view.get_grid_rows_total() == 0: grid_view.add_one_row() else: before_num = grid_view.get_grid_rows_total() print("before_num=======%s" % before_num) grid_view.delete_grid_all_rows() after_num = grid_view.get_grid_rows_total() print("after_num=======%s" % after_num) self.assertNotEqual(before_num, after_num, msg=menu3 + '全选删除检验不通过')
def test_tab_delete_all_grid_case(self): '''网格视图删除全选记录''' #判断切换后的字段是否可见 mp = MainPage(self.driver) menu3 = '选项卡_父子关系视图及重计算' self.open_menu3(menu3) #网格视图是在iframe下 mp.switch_to_grid_iframe() grid_view = GridViewPage(self.driver) if grid_view.get_grid_rows_total() == 0: grid_view.add_one_row() print("录入数据了====") else: before_num=grid_view.get_grid_rows_total() print("before_num=======%s"%before_num) grid_view.delete_grid_all_rows() after_num=grid_view.get_grid_rows_total() print("after_num=======%s"%after_num) self.assertNotEqual(before_num, after_num, msg=menu3+'全选删除检验不通过')