Exemple #1
0
 def test_me_0004(self):
     """编辑资料页面昵称里面输入字符串"""
     me_page = MinePage()
     self.assertEqual(me_page.is_on_this_page(), True)
     me_page.click_personal_photo()
     meEdit_page = MeEditProfilePage()
     meEdit_page.input_profile_name('昵称', r"<>'\"&\n\r")
     self.assertEqual(meEdit_page.is_toast_exist('不能包含特殊字符和表情'), True)
Exemple #2
0
 def test_me_0005(self):
     """编辑资料页面昵称里面输入数字"""
     me_page = MinePage()
     self.assertEqual(me_page.is_on_this_page(), True)
     me_page.click_personal_photo()
     meEdit_page = MeEditProfilePage()
     meEdit_page.input_profile_name('昵称', '4135435')
     meEdit_page.click_save()
     self.assertTrue(meEdit_page.check_text_exist('保存成功'))
Exemple #3
0
 def test_me_0002(self):
     """编辑资料页面里面点击头像"""
     me_page = MinePage()
     self.assertEqual(me_page.is_on_this_page(), True)
     me_page.click_personal_photo()
     meEdit_page = MeEditProfilePage()
     meEdit_page.click_profile_photo()
     meEdit_page.click_photo_more()
     time.sleep(2)
     meEdit_page.element_is_clickable('从手机相册选择')
     meEdit_page.element_is_clickable('保存到手机')
Exemple #4
0
 def test_me_0003(self):
     """编辑资料页面昵称里面输入sql语句"""
     me_page = MinePage()
     time.sleep(2)
     self.assertEqual(me_page.is_on_this_page(), True)
     me_page.click_personal_photo()
     meEdit_page = MeEditProfilePage()
     meEdit_page.input_profile_name('昵称', 'selectfrom')
     time.sleep(1)
     meEdit_page.click_save()
     for i in range(3):
         if meEdit_page.is_toast_exist('保存成功', timeout=0.3) \
                 or meEdit_page.is_toast_exist('您的资料未变化', timeout=0.3):
             break
Exemple #5
0
 def test_me_0001(self):
     """资料页面的字段可显示并且可以编辑"""
     me_page = MinePage()
     time.sleep(1)
     self.assertEqual(me_page.is_on_this_page(), True)
     me_page.click_personal_photo()
     meEdit_page = MeEditProfilePage()
     time.sleep(2)
     self.assertEqual(meEdit_page.is_text_exist("昵称"), True)
     self.assertEqual(meEdit_page.is_text_exist("性别"), True)
     self.assertEqual(meEdit_page.is_text_exist("年龄"), True)
     self.assertEqual(meEdit_page.is_text_exist("我的标签"), True)
     self.assertEqual(meEdit_page.is_text_exist("职业"), True)
     meEdit_page.click_profile_photo()
     meEdit_page.click_photo_back()
     time.sleep(2)
     self.assertEqual(meEdit_page.element_is_clickable("电话"), False)
     self.assertEqual(meEdit_page.element_is_clickable("昵称"), True)
     self.assertEqual(meEdit_page.element_is_clickable("性别"), True)
     self.assertEqual(meEdit_page.element_is_clickable("年龄"), True)
     self.assertEqual(meEdit_page.element_is_clickable("我的标签"), True)
     self.assertEqual(meEdit_page.element_is_clickable("职业"), True)
Exemple #6
0
 def make_already_in_me_profilePage():
     """"""
     Preconditions.make_already_in_me_page()
     me_page = MinePage()
     me_page.click_personal_photo()