def test_oder_details_page_lottery_paintball_case(self): '''验证订单详情页【点击投注竞彩足球】按钮,点击页面跳转至,竞彩足球选号页面''' hp = HomePage_leyou(self.driver) pbcn = PaintBallChooseNumber_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) pbc = PaintBallConfirm_leyou(self.driver) l = Login_leyou(self.driver) sos = SubmitOrderSuccess_leyou(self.driver) od = OrderDetails_leyou(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.My_lottery_ticket() # 点击我的彩票 l.login_leyou() # 点击登录 hp.homepage_link() # 点击首页 hp.paintball_link() ##点击竞彩足球 pbcn.Play_f() ###点击玩法 pbcn.Play_rqspf() ##点击让球胜平负 aa = pbcn.rqspf_choose(2) # 选择2场赛事 if aa == 2: pbcn.confirm_match() ###点击确认赛事 cl.submit_order_to_station_owner_button() # 点击提交订单给站主 cl.confirm_and_pay_button() # 点击确认支付 sos.check_order_details() # 点击查看详情 od.continue_buy() #验证订单详情页【点击投注竞彩足球】按钮 pbcn.Play_f() ###点击玩法 pbcn.Play_rqspf() ##点击让球胜平负 aa = pbcn.rqspf_choose(2) # 选择2场赛事 if aa == 2: pbcn.confirm_match() ###点击确认赛事 cl.submit_order_to_station_owner_button() # 点击提交订单给站主 cl.confirm_and_pay_button() # 点击确认支付 text1 = sos.submit_order_success() # 获取提交订单成功文本 self.assertEqual('订单提交成功', text1)
def test_threestar_choose_one_continue_choose_case(self): '''验证订单详情页【点击投注重庆时时彩】,页面跳转至选号页面''' hp = HomePage_leyou(self.driver) hp.open() l = Login_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) efcl = EleChooseFiveConfirmLottery_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) sos = SubmitOrderSuccess_leyou(self.driver) od = OrderDetails_leyou(self.driver) hp.Moveable_float_close() #点击关闭浮窗 hp.My_lottery_ticket() #点击我的彩票 l.login_leyou() #点击登录 hp.homepage_link() #点击首页 hp.Moveable_float_close() # 点击关闭浮窗 hp.cqssc_link() #点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_leyou(self.driver) ssc_cn.play_mode() #选择模式 ssc_cn.three_star() #选择三星 num1 = ssc_cn.three_star_select(1, 1, 1) efcn.confirm_number_button() # 点击确认选号 efcl.submit_order_button() # 点击提交订单给站主 cl.confirm_and_pay_button() # 点击确认并支付 hp.Moveable_float_close() # 如果出现浮层弹框,关闭 sos.check_order_details() # 点击查看订单详情 od.continue_buy() #点击继续购买此彩种 cc = efcn.total_buy_text() self.assertIn("请每位至少选择1个号码", cc, '页面未跳转至选号页面')
def test_LotteryOderDetails_continue_case(self): '''提交订单成功页,点击【继续投注该彩种】,页面跳转至选号页验证''' ###点击进入大乐透进入大乐透选号页面### hp = HomePage_leyou(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() l = Login_leyou(self.driver) hp.My_lottery_ticket() # 点击我的彩票 l.login_leyou() # 点击登录 sos = SubmitOrderSuccess_leyou(self.driver) hp.homepage_link() # 点击首页 hp.Moveable_float_close() hp.Lottery_link() # 点击大乐透链接 blcn = BigLotteryChooseNum_leyou(self.driver) blcl = BigLotteryConfirmLottery_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) od = OrderDetails_leyou(self.driver) ulcn = UnionLottoChooseNumber_leyou(self.driver) blcn.l_red_label5() #选择5个红球 blcn.l_bule_label2() #选择2个蓝球 ulcn.Confirm_button() # 点击确认选号按钮 mu1 = cl.Select_number() #读取投注确认页所选号码 cl.submit_order_to_station_owner_button() #提交订单给站主按钮 cl.confirm_and_pay_button() #点击确认支付 sos.check_order_details() #点击查看订单详情 mu2 = od.Betting_nu() #读取订单详情页号码 self.assertEqual(mu1, mu2, '订单详情页显示有误') od.continue_buy() #点击继续投注该彩种 blcn.l_red_label5() # 选择5个红球 blcn.l_bule_label2() # 选择2个蓝球 ulcn.Confirm_button() # 点击确认选号按钮
def test_orderdetails_page_continue_buy_case(self): '''订单详情页面,点击继续购买该方案,可以跳转到选号确认页面,提交订单''' hp = HomePage_leyou(self.driver) ulcn = UnionLottoChooseNumber_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) efcl = EleChooseFiveConfirmLottery_leyou(self.driver) od = OrderDetails_leyou(self.driver) l = Login_leyou(self.driver) sos = SubmitOrderSuccess_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) hp.open() hp.Moveable_float_close() hp.My_lottery_ticket() #点击我的彩票 l.login_leyou() #登录 hp.homepage_link() #点击首页 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) # 任选两个号 efcn.confirm_number_button() # 点击确认选号 efcl.submit_order_button() # 点击提交订单给站主 cl.confirm_and_pay_button() ##点击确认并支付 hp.Moveable_float_close() # 如果出现浮层弹框,关闭 sos.check_order_details() #点击查看订单详情 od.continue_buy() #点击继续投注该彩种 efcn.hand_options(3) # 任选3个号 efcn.confirm_number_button() # 点击确认选号 text1 = efcl.lottery_chase_throw_text() self.assertIn("3注1期1倍", text1) num1 = efcl.Ele_five_select_number() # 获取投注确认页的选号 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)