def test_User_agreement_case(self):
     '''投注确认页面,点击用户协议,能够打开和关闭'''
     hp = HomePage_lexiu(self.driver)
     tD = There_D_choosenumber_lexiu(self.driver)
     ulcn = UnionLottoChooseNumber_lexiu(self.driver)
     efcn = ElevenFiveChooseNumber_lexiu(self.driver)
     efcl = EleChooseFiveConfirmLottery_lexiu(self.driver)
     od = OrderDetails_lexiu(self.driver)
     l = Login_lexiu(self.driver)
     sos = SubmitOrderSuccess_lexiu(self.driver)
     cl = ConfirmLottery_lexiu(self.driver)
     hp.open()
     hp.Moveable_float_close()
     hp.gd_11_5_link()  # 点击广东11选5链接
     efcn.spread_mode_button()  # 展开玩法
     efcn.mode_choose(23, 1)  # 广东11选5任选二
     efcn.hand_options(2)  # 任选两个号
     sleep(2)
     efcn.confirm_number_button()  # 点击确认选号
     num1 = efcl.Ele_five_select_number()  # 获取投注确认页的选号
     cl.User_agreement()  #点击《用户协议》
     cl.User_know()  #点击【我知道了】
     efcl.submit_order_button()  # 点击提交订单给站主
     l.login_lexiu()  # 点击登录
     efcl.submit_order_button()  # 点击提交订单给站主
     cl.confirm_and_pay_button()  ##点击确认并支付
     hp.Moveable_float_close()  # 如果出现浮层弹框,关闭
     text = sos.submit_order_success()  # 获取页面“订单提交成功”文本
     self.assertEqual("订单提交成功", text)
     trade_name = sos.trade_name_text()  # 获取页面商品名称文本
     self.assertIn("商品名称:乐秀赢球-广东11选5", trade_name)
     sos.check_order_details()  # 点击查看订单详情
     num2 = od.Ele_five_betting_nu()  # 获取订单详情页的号码
     self.assertEqual(num1, num2)
示例#2
0
 def test_UnionLotto_User_agreement(self):
     """验证用户协议"""
     ha = HomePage_lexiu(self.driver)
     hb = UnionLottoChooseNumber_lexiu(self.driver)
     hc = ConfirmLottery_lexiu(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.UnionLotto_link()  # 点击双色球链接
     hb.u_red_label6()  # 任意选择6个红球
     hb.u_bule_label1()  # 任意选择1个蓝球
     hb.Confirm_button()  # 点击确认选号按钮
     hc.User_agreement()  ##点击用户协议
     hc.User_know()  ##点击用户协议我知道了
     mur = hc.lottery_number_text()  # 读取注数
     self.assertEqual('1', mur)  ##断言
     nu = hc.throw_time_text()  ###倍数
     self.assertEqual('1', nu)
     hc.submit_order_to_station_owner_button()