def test_login_nullname(self): # 用户名、手机号正确 url = 'https://test.xliane.com/html2/webapp/fastIssue/index.html#/customerRecommend/index' self.user_login_verify("", "17621523737", url, 1001) po = Login(self.driver) sleep(3) self.assertIn("姓名为空或格式不正确", po.pwd_error_hint()) function.insert_img(self.driver, "user_name_miss2.png") print('用户名为空,提示姓名为空或格式不正确') sleep(1)
def test_login_numbmiss(self): # 用户名正确,手机号码少一位 url = 'https://test.xliane.com/html2/webapp/fastIssue/index.html#/customerRecommend/index' self.user_login_verify("李孝雪", "1762152373", url, 1001) po = Login(self.driver) sleep(3) self.assertIn("手机号为空或格式不正确", po.pwd_error_hint()) function.insert_img(self.driver, "user_numb_miss4.png") print('用户名正确,手机号码少一位') sleep(1)
def test_login_numbenglish(self): # 手机不正确,不是数字 url = 'https://test.xliane.com/html3/webapp/fastIssue/index.html#/customerRecommend/index' self.user_login_verify("李孝雪", "17621523736", url, 1001) po = Login(self.driver) sleep(3) self.assertIn("手机号为空或格式不正确", po.pwd_error_hint()) function.insert_img(self.driver, "user_numb_english5.png") print('手机不正确,不是数字') sleep(1)
def test_login_orgmiss(self): '''礼品配送登陆''' url = 'https://test.xliane.com/html2/webapp/fastIssue/index.html?bz1=0#/giftDistribute/index' self.user_login_verify("13262576101", url) Login(self.driver) sleep(3)
def test_login_identitymiss(self): '''推荐结果登陆''' url = 'https://test.xliane.com/html2/webapp/fastIssue/index.html#/fastProgress/index' self.fast_login_verify("512236197807102659", url) Login(self.driver) sleep(3)
def test_login_orgmiss(self): '''推荐结果登陆''' url = 'https://test.xliane.com/html2/webapp/fastIssue/index.html#/recommendResult/index' self.user_login_verify( "12000000101", url) Login(self.driver) sleep(3)
def test_login_plusmiss(self): '''推荐结果登陆''' url = 'https://test.xliane.com/html2/webapp/fastIssue/index.html#/interactPlus0/index' self.plus_login_verify('12000000000', url) Login(self.driver) sleep(3)
def test_login_orgmiss(self): '''推荐结果登陆''' url = 'https://test.xliane.com/html2/webapp/fastIssue/index.html#/tplus0/index' self.t_login_verify("17621523736", url, 1001) Login(self.driver) sleep(3)
def test_login_orgmiss(self): '''推荐结果登陆''' url = 'https://test.xliane.com/html2/webapp/fastIssue/index.html#/mgm/index' self.mgm_login_verify("13262576102", "窦路路", url, 1002) Login(self.driver) sleep(3)
def test_login_detail_info(self): url = 'https://test.xliane.com/html/webapp/fast-issue-con/process_three.html' self.other_login_verify("皮卡丘", "17777777777", "*****@*****.**", url) Login(self.driver) sleep(3)
def test_login_customermiss(self): '''推荐结果登陆''' url = 'https://test.xliane.com/html2/webapp/fastIssue/index.html#/customerProgress/index' self.customer_login_verify("512236197807102659", "15765484676", url) Login(self.driver) sleep(3)
def test_login_miss(self): '''溯源推荐结果查询登陆''' url = 'https://test.xliane.com/html2/webapp/fastIssue/index.html#/rootsResult/index' self.user_login_verify("12000000000", url) Login(self.driver) sleep(3)
def test_login_detailinfo(self): url = 'https://test.xliane.com/html3/webapp/fast-issue-con/process_one.html' self.process_first_page("测试书记", "512236197807102659", "15765484677", url) url = 'https://test.xliane.com/html3/webapp/fast-issue-con/process_one.html' self.info_login_verify("上海蓝天科技有限公司", "021", "6951691", "浦东新区来安路500号", "业务部", "120", "广兰路200号", url) Login(self.driver) sleep(3)
def user_login_verify(self, phone, url): Login(self.driver).login_recommendation(phone, url)
def mgm_login_verify(self, phone, username, url, org): # url = 'https://test.xliane.com/html2/webapp/fastIssue/index.html#/mgm/index' # Login(self.driver).mgm_recommendation(phone, username, url, org)
def fast_login_verify(self, identity, url): # url = 'https://test.xliane.com/html2/webapp/fastIssue/index.html#/mgm/index' # Login(self.driver).fast_progress(identity, url)
def plus_login_verify(self, phone, url): # url = 'https://test.xliane.com/html2/webapp/fastIssue/index.html#/mgm/index' Login(self.driver).t_code(phone, url)
def customer_login_verify(self, identity, phone, url): # url = 'https://test.xliane.com/html2/webapp/fastIssue/index.html#/mgm/index' Login(self.driver).customer_progress(identity, phone, url)
def user_login_verify(self, username, phone, url, number): Login(self.driver).user_login(username, phone, url, number)
def user_login_verify(self, phone, url): Login(self.driver).gift_distribute(phone, url)