def test_UnionLotto_Continue_buy(self): """验证继续投注该彩种""" ha = HomePage_leyou(self.driver) hb = UnionLottoChooseNumber_leyou(self.driver) hc = ConfirmLottery_leyou(self.driver) hc1 = PaintBallChooseNumber_leyou(self.driver) hl = Login_leyou(self.driver) hd = SubmitOrderSuccess_leyou(self.driver) hf = SubmitOrderSuccess_leyou(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() # 点击确认选号按钮 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() #hl.new_user_login_tab() # 点击新登录 hl.login_leyou() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付 hd.Continue_buy() ##点击继续购买该彩种 mur1 = hc1.Play_fb() self.assertEqual('玩\n法', mur1) hb.machine_choose_button() # 点击机选 hb.machine_choose_one_button() # 机选一注 hb.Confirm_button() # 确认选号 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付 text1 = hf.submit_order_success() # 获取提交订单成功文本 self.assertEqual('订单提交成功', text1)
def test_lottery_success_page_continue_lottery_case( self): #####################-----------------mj20171215 '''验证投注成功页【继续投注该彩种】按钮,点击页面跳转至竞彩足球选号页面''' 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) t = There_D_choosenumber_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.Continue_buy() #点击【继续投注该彩种】 pbcn.Play_f() ###点击玩法 pbcn.Play_rqspf() ##点击让球胜平负 bb = pbcn.rqspf_choose(2) #选择2场赛事 if bb == 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_buy_caizhong_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.Continue_buy() #点击继续投注该彩种 cc = efcn.total_buy_text() self.assertIn("请每位至少选择1个号码", cc, '页面未跳转至选号页面')
def test_SuccessPage_continue_buy_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.Continue_buy() #点击继续购买此彩种 blcn.l_red_label5() # 选择5个红球 blcn.l_bule_label2() # 选择2个蓝球 ulcn.Confirm_button() # 点击确认选号按钮
def test_success_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.Continue_buy() #点击机选购买此彩种 efcn.hand_options(3) # 任选3个号 efcn.confirm_number_button() # 点击确认选号 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)