示例#1
0
 def setup(self):  # 每个用例执行进入更多icon
     city = shouyepage.Cities(driver)
     city.dishi()
     city.qiehuan("湖南", "长沙")
     city.check_adBtn()
     test = shouyepage.Package(driver)
     test.gengduo()
示例#2
0
 def setup(self):  # 每个用例执行进入我的账单
     city = shouyepage.Cities(driver)
     city.dishi()
     city.qiehuan("湖南", "长沙")
     city.check_adBtn()
     test = shouyepage.Bill(driver)
     test.gengduo()
示例#3
0
 def test_001(self):  # 跳转地市是否正确
     city = shouyepage.Cities(driver)
     try:
         assert city.try_text(shouyepage.Shouye.title_loc) == "省市选择"
         logging.info('跳转地市选择')
     except:
         logging.error("跳转省市选择错误")
         city.get_screenshot("跳转省市选择错误")
         raise
示例#4
0
 def test_004(self):  # 切换省市是否正确
     city = shouyepage.Cities(driver)
     city.search("北京")
     city.choose()
     city.close_c()
     try:
         assert city.try_text(shouyepage.Cities.city_loc) == "北京"
     except:
         logging.error('直辖市直接切换')
         city.get_screenshot("直辖市切换失败")
         raise
示例#5
0
 def test_003(self):  # 省市切换流程是否正确
     city = shouyepage.Cities(driver)
     city.qiehuan("广东", "清远")
     city.close_c()
     try:
         assert city.try_text(shouyepage.Cities.city_loc) == "清远"
         logging.info('地市切换成功')
     except:
         logging.error("地市切换错误")
         city.get_screenshot("地市切换错误")
         raise
示例#6
0
 def test_002(self):  # 省会置顶是否正确
     city = shouyepage.Cities(driver)
     city.search("广东")
     city.choose()
     try:
         assert city.try_text(shouyepage.Cities.c_choose_loc) == "广州"
         logging.info('省会置顶')
     except:
         logging.error("省会不置顶")
         city.get_screenshot("省会不置顶")
         raise
     finally:
         city.back()
示例#7
0
 def teardown(self):  # 每个用例结束返回
     city = shouyepage.Cities(driver)
     city.back()
示例#8
0
 def setup(self):  # 每个用例执行进入地市
     city = shouyepage.Cities(driver)
     city.dishi()
示例#9
0
 def teardown(self):  # 每个用例结束返回
     test = shouyepage.Cities(driver)
     test.back()
     test.login_s()