def test_refresh_calculate_case(self): '''刷新_重计算''' name = '计算脚本_重计算' comp = CalculatePage(self.driver) input = InputPage(self.driver, '计算脚本_单行文本刷新') input.send_keys_trigger_refresh('refresh_calculate') self.assertTrue(comp.has_the_text('refresh_calculate生效'), msg=name + '检验不通过')
def test_refresh_calculate_case(self): '''刷新_重计算''' name = '计算脚本_重计算' comp = CalculatePhonePage(self.driver) input = InputPage(self.driver, '计算脚本_单行文本刷新') input.send_keys_trigger_refresh('refresh_calculate') self.assertIn('refresh_calculate生效', comp.get_curpage_span(), msg=name + '检验不通过')
def test_refresh_calculate_case(self): '''刷新_重计算''' name = '单行文本_刷新_重计算' comp = InputPage(self.driver, name) comp.send_keys_trigger_refresh('refresh') comp = InputPage(self.driver, name) self.assertEqual('refresh end', comp.get_attr('value'), msg=name + '检验不通过')
def test_refresh_calculate_case(self): '''刷新_重计算''' name = 'html编辑器_重计算' comp = HtmlPage(self.driver, name) self.assertIsNotNone(comp.get_the_div(), msg=name + '检验不通过') self.assertIsNotNone(comp.get_the_div_iframe(), msg=name + '检验不通过') input = InputPage(self.driver, '单行文本刷新') input.send_keys_trigger_refresh('hide') self.assertIsNone(comp.get_the_div(), msg=name + '检验不通过') self.assertIsNone(comp.get_the_div_iframe(), msg=name + '检验不通过')
def test_recaculate_case(self): '''重计算''' # self.scroll_to('0') reflesh_name = '只读刷新' name = '树形部门选择框_重计算' comp = InputPage(self.driver, reflesh_name) comp.send_keys_trigger_refresh('只读') comp2 = TreeDepartmentPage(self.driver, name) self.assertTrue(comp2.span_is_displayed(), msg=name + '检验不通过')
def test_refresh_calculate_case(self): '''刷新_重计算''' name = '二维码_重计算' comp = QrcodePage(self.driver, name) self.assertIsNotNone(comp.find_elem('input[name="' + name + '"] + div > canvas'), msg=name + '检验不通过') input = InputPage(self.driver, '二维码_单行文本刷新') input.send_keys_trigger_refresh('hide') self.assertTrue(comp.is_elem_invisibility('input[name="' + name + '"] + div > canvas'), msg=name + '检验不通过')
def test_refresh_calculate_case(self): '''刷新_重计算''' name = '调查问卷_重计算' comp = SurveyPage(self.driver, name) self.assertNotEqual('none', comp.get_the_div(), msg=name + '检验不通过') self.assertIn('羽毛球', comp.get_the_div_text(), msg=name + '检验不通过') input = InputPage(self.driver, '单行文本刷新') input.send_keys_trigger_refresh('hide') self.assertEqual('none', comp.find_element_by_css_selector('input[name="' + name + '"]'), msg=name + '检验不通过')
def test_refresh_calculate_case(self): '''刷新_重计算''' name = '二维码_重计算' comp = QrcodePhonePage(self.driver, name) self.assertNotEqual('none', comp.find_element('input[name="' + name + '"] + div canvas'), msg=name + '检验不通过') input = InputPage(self.driver, '二维码_单行文本刷新') input.send_keys_trigger_refresh('hide') self.assertIsNone(comp.find_element('input[name="' + name + '"] + div canvas'), msg=name + '检验不通过')
def test_refresh_calculate_case(self): '''刷新_重计算''' name = '地图_重计算' comp = MapPage(self.driver, name) iframe = comp.get_the_map_iframe() comp.switch_to_the_iframe(iframe) self.assertTrue(comp.is_map_page(), msg=name + '检验不通过') mp = MainPage(self.driver) mp.switch_to_parent() mp.switch_to_iframe() input = InputPage(self.driver, '单行文本刷新') input.send_keys_trigger_refresh('hide') self.assertFalse(comp.is_element_visible('input[name="' + name + '"]'), msg=name + '检验不通过')
def test_collapse_hide_case(self): '''选项卡折叠视图刷新隐藏''' menu3 = '选项卡_折叠重计算' self.open_menu3(menu3) tabpage = TabPage(self.driver) #验证只读时,列表视图的按钮是否可见 input_page = InputPage(self.driver,"重计算") input_page.send_keys_trigger_refresh("隐藏") tabpage = TabPage(self.driver) #展开第二个折叠项 collapse=['1','2','3'] for collapseone in collapse: collapse1 = tabpage.find_tab_collapse(collapseone) dispaly = collapse1.get_attribute("style") self.assertIn("display: none;",dispaly,msg=collapseone+'选项卡折叠刷新隐藏检验不通过')
def test_refresh_calculate_case(self): '''刷新_重计算''' name = '在线拍照_重计算' comp = TakephotoPage(self.driver, name) self.assertEqual('OnLineTakePhotoField', comp.get_attr('fieldtype'), msg=name + '检验不通过') self.assertEqual('/resource/image/photo.png', comp.get_attr('value'), msg=name + '检验不通过') self.assertTrue(comp.check_img(), msg=name + '检验不通过') input = InputPage(self.driver, '单行文本刷新') input.send_keys_trigger_refresh('hide') self.assertEqual('none', comp.find_element_by_css_selector('input[name="' + name + '"]'), msg=name + '检验不通过')
def test_refresh_calculate_case(self): '''刷新_重计算''' name = 'word控件_重计算' comp = WordPage(self.driver, name) self.assertNotEqual('none', comp.get_the_div(), msg=name + '检验不通过') self.assertNotEqual('none', comp.get_the_div_hide(), msg=name + '检验不通过') self.assertNotEqual('none', comp.get_the_div_img(), msg=name + '检验不通过') self.assertIn('/share/images/view/genericword.jpg', comp.get_the_div_img_src(), msg=name + '检验不通过') input = InputPage(self.driver, '单行文本刷新') input.send_keys_trigger_refresh('hide') self.assertEqual('none', comp.find_element_by_css_selector('input[name="' + name + '"]'), msg=name + '检验不通过')