def test_windowsize_size(self):
     comp = FileUploadPage(self.driver)
     name = '图片上传_显示大小'
     compname = '图片上传控件_显示大小'
     type = comp.find_elem(
         'span[name="' + compname +
         '"]+div.upload-box > div > div.uploadinput').get_attribute('style')
     self.assertIn('height: 80px; width: 80px;', type, msg=name + '检验不通过')
 def test_readonly_case(self):
     '''图片上传_只读'''
     comp = FileUploadPage(self.driver)
     name = '图片上传_只读'
     compname = '图片上传_只读'
     comp.scroll_to_pic_upload_btn(compname)
     bool = comp.find_elem('span[name="' + compname + '"]').is_displayed()
     self.assertFalse(bool, msg=name + '检验不通过')
     text = comp.getcompatrr(compname, 'disabled')
     self.assertEqual('true', text, msg=name + '检验不通过')
Exemplo n.º 3
0
 def test_readonly_case(self):
     '''文件上传控件只读'''
     self.scroll_to('1200')
     comp = FileUploadPage(self.driver)
     name = '文件上传_条件只读'
     compname = '文件上传_条件只读'
     bool = comp.find_elem('span[name="' + compname + '"]').is_displayed()
     self.assertFalse(bool, msg=name + '检验不通过')
     text = comp.getcompatrr(compname, 'disabled')
     self.assertEqual('true', text, msg=name + '检验不通过')