Exemplo n.º 1
0
 def test_delete_grid_one_row(self):
     '''删除一个记录'''
     menu3 = '网格视图_按钮操作'
     self.open_menu3(menu3)
     grid_view = GridViewPage(self.driver)
     if grid_view.get_grid_rows_total() == 0:
         grid_view.add_one_row()
     before_num = grid_view.get_grid_rows_total()
     print("before_num=======%s" % before_num)
     grid_view.delete_grid_rows(1)
     after_num = grid_view.get_grid_rows_total()
     print("after_num=======%s" % after_num)
     self.assertNotEqual(before_num, after_num, msg=menu3 + '删除记录检验不通过')
Exemplo n.º 2
0
 def test_tab_delete_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("录入数据了====")
     before_num=grid_view.get_grid_rows_total()
     print("before_num=======%s"%before_num)
     grid_view.delete_grid_rows(1)
     after_num=grid_view.get_grid_rows_total()
     print("after_num=======%s"%after_num)
     self.assertNotEqual(before_num, after_num, msg=menu3+'删除记录检验不通过')