Esempio n. 1
0
 def test_biejing(self):  #首次启动客户端,默认定位      新增
     shouye = shouyepage.Shouye(driver)
     try:
         assert shouye.try_text(shouyepage.Shouye.beijin_loc) == "北京"
         logging.info('客户端定位默认为北京')
     except:
         logging.info('客户端定位默认失败')
         raise
Esempio n. 2
0
 def test_010(self):  # 是否有和信用分
     shouye = shouyepage.Shouye(driver)
     try:
         assert shouye.try_find(shouyepage.Shouye.xinyong_loc) is True
         logging.info('有和信用分')
     except:
         logging.error("无和信用分入口")
         shouye.get_screenshot("无和信用分入口")
         raise
Esempio n. 3
0
 def test_008(self):  # 是否有情感化插件
     shouye = shouyepage.Shouye(driver)
     try:
         assert shouye.try_find(shouyepage.Shouye.qinggan_loc) is True
         logging.info('有情感化插件')
     except:
         logging.error("无情感化插件")
         shouye.get_screenshot("无情感化插件")
         raise
Esempio n. 4
0
 def test_fenlei(self):  #更多icon跳转到分类页,查看跳转是否正确    新增
     test = shouyepage.Shouye(driver)
     time.sleep(5)
     try:
         assert test.try_text(shouyepage.Shouye.title_loc) == "分类"
         logging.info('更多icon跳转正确')
     except:
         logging.error('更多icon跳转错误')
         test.get_screenshot('更多icon跳转错误')
         raise
Esempio n. 5
0
 def test_009(self):  # 情感化插件关闭
     shouye = shouyepage.Shouye(driver)
     shouye.close_c()
     try:
         assert shouye.try_find(shouyepage.Shouye.qinggan_loc) is False
         logging.info('情感化插件关闭')
     except:
         logging.error("情感化插件关闭失败")
         shouye.get_screenshot("情感化插件关闭失败")
         raise
Esempio n. 6
0
 def test_dingdanxi(self):  #未登录状态,消息中心页面显示     新增
     shouye = shouyepage.Shouye(driver)
     shouye.upper_right()
     shouye.xiaoxi()
     time.sleep(3)
     try:
         assert shouye.try_find(shouyepage.Shouye.dingdanxi_loc) is True
         logging.info('消息中心页面显示正确')
     except:
         logging.error("消息中心页面显示失败")
         shouye.get_screenshot("消息中心页面显示失败")
         raise
Esempio n. 7
0
 def test_xiaoxi(self):  #未登录状态,右上角更多按钮显示    新增
     shouye = shouyepage.Shouye(driver)
     shouye.upper_right()
     time.sleep(3)
     try:
         assert shouye.try_text(shouyepage.Shouye.xiaoxi_loc) == "消息"
         logging.info('右上角更多按钮显示正确')
     except:
         logging.error("右上角更多按钮显示失败")
         shouye.get_screenshot("右上角更多按钮显示失败")
         raise
     finally:
         shouye.xiaoxi()
Esempio n. 8
0
 def test_011(self):  # 和信用分跳转是否正确
     shouye = shouyepage.Shouye(driver)
     shouye.jingxi()
     time.sleep(3)
     try:
         assert shouye.try_find(shouyepage.Shouye.liaojie_loc) is True
         logging.info('和信用分跳转')
     except:
         logging.error("和信用分跳转错误")
         shouye.get_screenshot("和信用分跳转错误")
         raise
     finally:
         shouye.close()
Esempio n. 9
0
 def test_008(self):  # 未登录是否可登录
     card = shouyepage.Card(driver)
     card.look()
     login = loginpage.Login(driver)
     login.login('13715307043')
     card = shouyepage.Shouye(driver)
     card.close_c()
     try:
         assert card.try_find(shouyepage.Card.tishi_loc) is False
         logging.info('登录成功')
     except:
         logging.error("登录失败")
         card.get_screenshot("登录失败")
         raise
Esempio n. 10
0
 def test_denglu(self):  #未登录状态,点击消息订单,拉起登录页面      新增
     shouye = shouyepage.Shouye(driver)
     shouye.upper_right()
     shouye.xiaoxi()
     shouye.dingdanxi()
     time.sleep(3)
     try:
         assert shouye.try_text(shouyepage.Shouye.denglu_loc) == "欢迎登录"
         logging.info('拉起登录页面')
     except:
         logging.error("拉起登录失败")
         shouye.get_screenshot("拉起登录失败")
         raise
     finally:
         shouye.fanhui()
Esempio n. 11
0
def setup_module():  # 整个.py模块启动一次客户端
    base = loginpage.Login(driver)
    base.start()
    base = shouyepage.Shouye(driver)
    base.check_guide_know()