Пример #1
0
    def test_login2_PasswdError(self):
        '''帐号或者密码不正确'''
        po = LoginPage(self.driver)
        po.Login_action('admin', 'admin123456')
        sleep(1)

        self.assertEqual(po.type_loginFail_hint(), '找回密码')
        function.insert_img(self.driver, "login2登录时密码为空.jpg")
Пример #2
0
    def test_login1_empty(self):
        '''帐号和密码都为空'''
        po = LoginPage(self.driver)
        po.Login_action('', '')
        sleep(1)

        self.assertEqual(po.type_loginFail_hint(), '找回密码')
        function.insert_img(self.driver, "login1登陆时帐号密码为空.jpg")
Пример #3
0
    def test_login3_normal(self):
        '''帐号和密码都正确'''
        po = LoginPage(self.driver)
        po.Login_action('admin', 'admin12345678')
        sleep(1)

        self.assertEqual(po.type_loginPass_hint(), '多维分析')
        function.insert_img(self.driver, "login3登录成功.jpg")
Пример #4
0
 def test_article_normal(self):
     print('test_login_normal is start test...')
     po = LoginPage(self.driver)
     po.login_action("00000554", '123456')
     sleep(3)
     po1 = ArticleTest(self.driver)
     po1.click_menu()
     print('test_login_normal test end!')
Пример #5
0
    def test_login2_PasswdError(self):
        '''用户名正确,密码错误'''
        print("test_ArtApp2_passwdError is start test...")
        po=LoginPage(self.driver)
        po.Login_action('15110136827',111111)

        self.assertEqual(po.type_loginFail_hint(),'')
        function.insert_img(self.driver,"test_ArtApp2_PasswdError.png")
        print("test_ArtApp2_empty test end")
Пример #6
0
    def test_login3_empty(self):
        '''用户名和密码为空'''
        print("test_ArtApp3_empty is start test...")
        po=LoginPage(self.driver)
        po.Login_action('','')

        self.assertEqual(po.type_loginFail_hint(),'')
        function.insert_img(self.driver,"test_ArtApp3_empty.png")
        print("test_ArtApp3_empty test end")
Пример #7
0
    def test_login2_PasswdError(self):
        '''username is OK,passwd is error'''
        print("test_login2 is start test...")
        po = LoginPage(self.driver)
        po.Login_action('51zxw', 33)
        sleep(2)

        self.assertEqual(po.type_loginFail_hint(), '')
        function.insert_img(self.driver, "test_login2_passwdError.jpg")
Пример #8
0
    def test_login3_empty(self):
        print('test_login3_empty 开始测试')
        po = LoginPage(self.driver)
        po.Login_action('', '')
        sleep(2)

        self.assertEqual(po.type_loginFail_hint(), '')
        function.insert_img(self.driver, 'test_login3_empty.png')
        print('测试结束')
Пример #9
0
 def test_login_norma2(self):
     '''输入错误的账号密码'''
     print('test_login_normal is start test...')
     po = LoginPage(self.driver)
     po.login_action('00321310', '111112')
     sleep(3)
     self.assertEqual(po.type_login_fail(), '')
     function.insert_img(self.driver, '登录失败.png')
     print('test_login_normal test end!')
Пример #10
0
    def test_login1_normal(self):
        print('test_login1_normal 开始测试')
        po = LoginPage(self.driver)
        po.Login_action('test', '123456')
        sleep(2)

        self.assertEqual(po.type_loginPass_hint(), '我的空间')
        function.insert_img(self.driver, 'test_login1_normal.png')
        print('测试结束')
Пример #11
0
 def test_login1_normal(self):
     print U'正确的账号密码点击登录'
     print u'开始第 1 次测试'
     po=LoginPage(self.dr)
     po.Login_action('admin@S003059',"111111")
     sleep(3)
     self.assertEqual(po.type_loginPass_hint(),u'退出登录')
     function.insert_img(self.dr,u"第 1 次测试截图.png")
     print u'第 1 次测试结束'
Пример #12
0
 def test_login3_empty(self):
     print U'用户名和密码为空点击登录'
     print u'开始第 3 次测试'
     po=LoginPage(self.dr)
     po.Login_action('','')
     sleep(2)
     self.assertEqual(po.type_loginFail_hint(),'')
     function.insert_img(self.dr,u"第 3 次测试截图.png")
     print u'第 3 次测试结束'
Пример #13
0
 def test_login2_PasswdError(self):
     print U'正确的用户名和错误的密码点击登录'
     print u'开始第 2 次测试'
     po=LoginPage(self.dr)
     po.Login_action('51zxw',3333)
     sleep(2)
     self.assertEqual(po.type_loginFail_hint(),'')
     function.insert_img(self.dr,u"第 2 次测试截图.png")
     print u'第 2 次测试结束'
Пример #14
0
    def test_login2_passwdError(self):
        print('test_login2_passwdError 开始测试')
        po = LoginPage(self.driver)
        po.Login_action('test', '1')
        sleep(2)

        self.assertEqual(po.type_loginFail_hint(), '')
        function.insert_img(self.driver, 'test_login2_passwdError.png')
        print('测试结束')
Пример #15
0
    def test_login3_empty(self):
        print('test statrt ...')
        po = LoginPage(self.driver)
        sleep(5)
        po.Login_action('', '')
        sleep(3)

        self.assertEqual(po.type_loginFail_hint(), '')
        function.insert_img(self.driver, 'empty.png')
        print('test login empty')
Пример #16
0
    def test_login2_PasswdError(self):
        print('test start ...')
        po = LoginPage(self.driver)
        sleep(5)
        po.Login_action('15256750385', '123456')
        sleep(3)

        self.assertEqual(po.type_loginFail_hint(), '')
        function.insert_img(self.driver, 'PasswdError.png')
        print('test login error')
Пример #17
0
    def test_login1_normal(self):
        print('test start ...')
        po = LoginPage(self.driver)
        sleep(5)
        po.Login_action('15256750385', 'lwl0909///')
        sleep(3)

        self.assertEqual(po.type_loginPass_hint(), '邀请有礼')
        function.insert_img(self.driver, 'normal.png')
        print('test login success')
Пример #18
0
    def test_login2_PasswdError(self):
        '''密码错误'''
        print('test_login2_passwderror is start test...')
        po = LoginPage(self.driver)
        po.Login_action('cherong', '111111')
        sleep(3)

        self.assertEqual(po.type_loginFail_hint(), '')
        function.insert_img(self.driver, 'login_passwderror.png')
        print('test_login2_passwderror test end!')
Пример #19
0
    def test_login3_empty(self):
        '''用户名和密码为空'''
        print('test_login3_empty is start test...')
        po = LoginPage(self.driver)
        po.Login_action('', '')
        sleep(3)

        self.assertEqual(po.type_loginFail_hint(), '')
        function.insert_img(self.driver, 'login_empty.png')
        print('test_login2_empty test end!')
Пример #20
0
    def test_login1_normal(self):
        '''用户名和密码正确'''
        print("test_ArtApp_normal is start test...")
        po = LoginPage(self.driver)
        po.Login_action('15110136827',"123456")
        sleep(2)

        self.assertEqual(po.type_loginPass_hint(),'退出')
        function.insert_img(self.driver,"test_ArtApp_normal.png")
        print("test_zentao1_normal test Pass!")
Пример #21
0
    def test_login1_normal(self):
        print('test login1_ normal is start run...')
        po = LoginPage(self.driver)
        po.Login_action('51zxw',123456)
        sleep(3)

        #断言与截屏
        self.assertEqual(po.type_loginPass_hint(),'我的空间')
        function.insert_img(self.driver,"51zxw_login1_normal.png")
        print("test_login1_normal is test end!")
Пример #22
0
    def test_login1_normal(self):
        '''用户名及密码正确'''
        print('test_login1_normal is start test...')
        po = LoginPage(self.driver)
        po.Login_action('cherong', '123456')
        sleep(3)

        self.assertEqual(po.type_loginPass_hint(), '我的空间')
        function.insert_img(self.driver, 'login_normal.png')
        print('test_login1_normal test end!')
Пример #23
0
    def test_login3_empty(self):
        '''username and passwd is empty '''
        print("test_login3_enpty is start test...")
        po = LoginPage(self.driver)
        po.Login_action('', '')
        sleep(2)

        self.assertEqual(po.type_loginFail_hint(), '')
        function.insert_img(self.driver, 'test_login3_empty.jpg')
        print("test_login3_empty test end")
Пример #24
0
    def test_login2_PasswdError(self):
        ''' 用户名正确,密码错误 '''
        print("test_login2_PasswdError is start run...")
        po = LoginPage(self.driver)
        po.Login_action('51zxw', 123422)
        sleep(2)

        self.assertEqual(po.type_loginFailhint(), '')
        function.insert_img(self.driver, "51zxw_login2_fail.png")
        print("test_login2_PasswdError is test end!")
Пример #25
0
    def test_login1_normal(self):
        """username and passwd is normal"""
        print('Start test login1_normal')
        po = LoginPage(self.driver)
        po.login_action(username1, passwd1)
        sleep(3)

        self.assertEqual(po.type_loginPass_hint(), '我的空间')
        function.insert_img(self.driver, 'login1success.png')
        print('Test login1_normal end')
Пример #26
0
    def test_login3_empty(self):
        '''用户名和密码为空'''
        print("test_login3_empty is start run...")
        po = LoginPage(self.driver)
        po.Login_action('', '')
        sleep(2)

        self.assertEqual(po.type_loginFailhint(), '')
        function.insert_img(self.driver, "51zxw_login3_fail.png")
        print("test_login3_empty is test end!")
Пример #27
0
    def test_login2_passwdError(self):
        """username is ok,passwd is error"""
        print('Start test login2_passwdError')
        po = LoginPage(self.driver)
        po.login_action(username2, passwd2)
        sleep(2)

        self.assertEqual(po.type_loginFail_hint(), '')
        function.insert_img(self.driver, 'login2passwdError.png')
        print('Test login2_passwdError end')
Пример #28
0
    def test_login1_normal(self):
        '''正常输入用户名和密码'''
        print("test_login1_normal is start run...")
        po = LoginPage(self.driver)
        po.Login_action('51zxw', 123456)
        sleep(2)

        self.assertEqual(po.type_loginPasshint(), '我的空间')
        function.insert_img(self.driver, "51zxw_login1_normal.png")
        print("test_login1_normal test end!")
Пример #29
0
    def test_login1_normal(self):
        '''username and passwd is normal'''
        print("test_login1 is start test...")
        po = LoginPage(self.driver)
        po.Login_action('51zxw', 123456)
        sleep(2)

        self.assertEqual(po.type_loginPass_hint(), '我的空间')
        function.insert_img(self.driver, "51zxw_login1.normal.jpg")
        print("test_login_normal test end")
Пример #30
0
    def test_login3_empty(self):
        """username and passwd is empty"""
        print('Start test login3_empty ')
        po = LoginPage(self.driver)
        po.login_action(username3, passwd3)
        sleep(2)

        self.assertEqual(po.type_loginFail_hint(), '')
        function.insert_img(self.driver, 'login3empty.png')
        print('Test login3_empty end')