Ejemplo n.º 1
0
 def test_column_coin(self):
     '''验证货币显示'''
     menu3 = '网格视图_不显示记录总数'
     self.open_menu3(menu3)
     grid_view = GridViewPage(self.driver)
     if grid_view.get_grid_rows_total() == 0:
         grid_view.add_one_row()
     self.assertIn('$1,000,123.46',
                   grid_view.get_grid_column_row1_coln_text('3'),
                   msg='列货币显示检验不通过')
Ejemplo n.º 2
0
 def test_column_decimal_point(self):
     '''验证千分位保留3位小数点'''
     menu3 = '网格视图_显示记录总数'
     self.open_menu3(menu3)
     grid_view = GridViewPage(self.driver)
     if grid_view.get_grid_rows_total() == 0:
         grid_view.add_one_row()
     self.assertIn('1,000,123.460',
                   grid_view.get_grid_column_row1_coln_text('3'),
                   msg='列千分位保留3位小数点检验不通过')
Ejemplo n.º 3
0
 def test_add_one_row(self):
     '''新建一个记录'''
     menu3 = '网格视图_按钮操作'
     self.open_menu3(menu3)
     grid_view = GridViewPage(self.driver)
     before_num = grid_view.get_grid_rows_total()
     print("before_num=======%s" % before_num)
     grid_view.add_one_row()
     grid_view.add_one_row()
     after_num = grid_view.get_grid_rows_total()
     print("after_num=======%s" % after_num)
     self.assertNotEqual(before_num, after_num, msg=menu3 + '新建记录检验不通过')
Ejemplo n.º 4
0
 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 + '全选删除检验不通过')
Ejemplo n.º 5
0
 def test_collapse_addrow_case(self):
     '''选项卡折叠方式增加网格视图记录'''
     #判断切换后的字段是否可见
     mp = MainPage(self.driver)        
     #time.sleep(0.5)
     menu3 = '选项卡_父子关系视图及重计算'
     self.open_menu3(menu3)        
     #网格视图是在iframe下
     mp.switch_to_grid_iframe()        
     grid_view = GridViewPage(self.driver)
     before_num=grid_view.get_grid_rows_total()
     print("before_num=======%s"%before_num)
     grid_view.add_one_row()
     after_num=grid_view.get_grid_rows_total()
     self.assertNotEqual(before_num, after_num, msg=menu3+'新建记录检验不通过') 
Ejemplo n.º 6
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+'删除记录检验不通过')