Beispiel #1
0
 def test_6ViewOrder(self):
     ip = HomePage(self.driver)
     ip.ReFresh()  # 在home页面里面刷新一下
     ip.Agg()
     XQ = Shop_Details(self.driver)
     XQ.Favorites()  # 点击收藏
     DL = Login1(self.driver)  # 提示要登录输入用户名和密码
     # username, password = Dates.data_Dl_ex()[0]
     DL.zjlogin("lisa", "admin123")
     XQ.Favorites()  # 再次进行收藏
     XQ.Return()  # 点击返回
     ip.Mine()  # 点击home页面我的
     # WD = Personal(self.driver)
     # WD.MyOrder()
     # Dd = WoOrder(self.driver)
     # actual = Dd.Order().text
     # expect = '我的订单'
     # self.assertIn(expect, actual, msg='提交失败')
     # sleep(6)
     ll = ExitLodgin(self.driver)
     ll.extsubmit()
Beispiel #2
0
 def test_5add_order(self):
     ip = HomePage(self.driver)
     ip.ReFresh()  # 在home页面里面刷新一下
     ip.Agg()  # 点击商品
     XQ = Shop_Details(self.driver)
     XQ.AddCart()  # 点击添加到购物车
     DL = Login1(self.driver)  # 提示要登录输入用户名和密码
     DL.zjlogin("lisa", "admin123")
     XQ.AddCart()  # 再次添加到购物车里面
     XQ.Okbutton()  # 点击确认按钮
     XQ.SmallCart()  # 点击购物车
     SC = ShoppingCart(self.driver)
     SC.ChooseButton()  # 点击选择商品按钮
     SC.Settlemnet()  # 点击结算按钮
     TJ = ConfirmOrder(self.driver)
     TJ.DeliveryMethod()  # 选择配送方式
     TJ.ChooseButton()  # 提交订单
     TJ.SubmitOrder()
     self.driver.quit()
     self.driver = open_app()
     ll = ExitLodgin(self.driver)
     ll.extsubmit()