def test_Lottery_Machine_Choose_ten_case(self): '''大乐透机选10注,追加10期测试''' hp = HomePage_lexiu(self.driver) hp.open() hp.Moveable_float_close() # 关闭悬浮窗口 hp.Lottery_link() # 点击大乐透链接 ulcn = UnionLottoChooseNumber_lexiu(self.driver) ulcn.machine_choose_button() # 点击机选按钮 ulcn.machine_choose_ten_button() # 点击机选5注 cl = ConfirmLottery_lexiu(self.driver) blcl = BigLotteryConfirmLottery_lexiu(self.driver) cl.chase_ticket_button() # 点击追xx期 blcl.additional_radio_button() # 点击追加单选按钮 cl.chase_ticket_button_ten() # 点击追加10期单选按钮 blcl.l_throw_times_button_sub(3) #输入投注倍数,点击“-”按钮 cl.submit_order_to_station_owner_button() # 点击提交订单给站主 l = Login_lexiu(self.driver) #l.new_user_login_tab() # 切换到新用户登录 l.login_lexiu() cl.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 cl.confirm_and_pay_button() # 点击“确认并支付”按钮 '''断言验证提交订单成功''' sos = SubmitOrderSuccess_lexiu(self.driver) hp.Moveable_float_close() # 关闭悬浮窗口 text = sos.submit_order_success() self.assertEqual("订单提交成功", text, "提交订单失败") # 返回首页 sos.return_home()
def test_singlefoot_spf_input10000times_case(self): ##mj20171215 '''选号页面,选择八场对阵,增加倍数为10000倍,提交订单''' hp = HomePage_lexiu(self.driver) pbcn = PaintBallChooseNumber_lexiu(self.driver) sfcn = SingleFootChooseNumber_lexiu(self.driver) pbc = PaintBallConfirm_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) l = Login_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) hp.open() hp.Moveable_float_close() hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 hp.homepage_link() # 点击首页 hp.single_foot_link() ##点击竞足单关 pbcn.Play_f() # 选择玩法 pbcn.Play_spf() #选择胜平负 aa = sfcn.jzdg_spf_choose(8) # 选择比赛 if aa == 2: pbcn.confirm_match() # 确认所选场次 pbc.Times_input_click() # 点击投注倍数 pbc.Times_input(10000) #输入投注10000倍 cl.submit_order_to_station_owner_button() # 提交订单给站主 cl.confirm_and_pay_button() # 点击确认支付 text1 = sos.submit_order_success() # 获取提交订单成功文本 self.assertEqual('订单提交成功', text1)
def test_bigsmall_machine_choose_ten_case(self): '''大小单双玩法,机选10注,确认选号提交订单''' hp = HomePage_lexiu(self.driver) hp.open() l = Login_lexiu(self.driver) efcn = ElevenFiveChooseNumber_lexiu(self.driver) efcl = EleChooseFiveConfirmLottery_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) ulcn = UnionLottoChooseNumber_lexiu(self.driver) hp.Moveable_float_close() # 点击关闭浮窗 hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 hp.homepage_link() # 点击首页 hp.cqssc_link() # 点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_lexiu(self.driver) ssc_cn.play_mode() # 选择模式 ssc_cn.big_little() # 选择大小单双玩法 ulcn.machine_choose_button() # 点击机选 ulcn.machine_choose_ten_button() # 机选10注 bb = efcl.lottery_chase_throw_text() # 获取注数倍数 self.assertIn("10注1期1倍", bb) efcl.submit_order_button() # 点击提交订单给站主 cl.confirm_and_pay_button() # 点击确认并支付 hp.Moveable_float_close() # 如果出现浮层弹框,关闭 text = sos.submit_order_success() # 获取页面“订单提交成功”文本 self.assertEqual("订单提交成功", text) hp.Moveable_float_close() # 如果出现浮层弹框,关闭 trade_name = sos.trade_name_text() # 获取页面商品名称文本 self.assertIn("商品名称:乐秀赢球-重庆时时彩", trade_name)
def test_check_order_details_case(self): '''验证点击【查看订单详情】页面跳转至订单详情页''' hp = HomePage_lexiu(self.driver) pbcn = PaintBallChooseNumber_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) pbc = PaintBallConfirm_lexiu(self.driver) sfcn = SingleFootChooseNumber_lexiu(self.driver) l = Login_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) od = OrderDetails_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 hp.homepage_link() # 点击首页 hp.single_foot_link() ##点击竞足单关 pbcn.Play_f() ###点击玩法 pbcn.Play_spf() ##点击胜平负 aa = sfcn.jzdg_spf_choose(2) # 选择2场赛事 if aa == 2: pbcn.confirm_match() ###点击确认赛事 cl.submit_order_to_station_owner_button() #点击提交订单给站主 cl.confirm_and_pay_button() #点击确认支付 hp.Moveable_float_close() sos.check_order_details() #点击查看详情 text1 = od.scheme_details() #获取订单详情页文本 self.assertEqual("方案详情", text1, '页面未跳转至订单详情页')
def test_oder_details_page_lottery_paintball_case(self): '''验证订单详情页【点击投注竞彩足球】按钮,点击页面跳转至,竞彩足球选号页面''' hp = HomePage_lexiu(self.driver) pbcn = PaintBallChooseNumber_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) pbc = PaintBallConfirm_lexiu(self.driver) sfcn = SingleFootChooseNumber_lexiu(self.driver) l = Login_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) od = OrderDetails_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 hp.homepage_link() # 点击首页 hp.single_foot_link() ##点击竞足单关 pbcn.Play_f() ###点击玩法 pbcn.Play_spf() ##点击胜平负 aa = sfcn.jzdg_spf_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_spf() ##点击让球胜平负 aa = sfcn.jzdg_spf_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_Lottery_Hand_r5b12_case(self): """大乐透手选5个红球12个蓝球购买流程测试""" ###点击进入大乐透进入大乐透选号页面### hp = HomePage_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.Lottery_link() # 点击大乐透链接 blcn = BigLotteryChooseNum_lexiu(self.driver) blcn.l_red_label5() # 任意选择5个红球 blcn.l_bule_label12() # 任意选择12个蓝球 ulcn = UnionLottoChooseNumber_lexiu(self.driver) ulcn.Confirm_button() # 点击确认选号按钮 cl = ConfirmLottery_lexiu(self.driver) cl.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 #####用户登录###### l = Login_lexiu(self.driver) #l.new_user_login_tab() # 切换到新用户登录 l.login_lexiu() cl.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 cl.confirm_and_pay_button() # 点击“确认并支付”按钮 '''断言验证提交订单成功''' sos = SubmitOrderSuccess_lexiu(self.driver) hp.Moveable_float_close() text = sos.submit_order_success() self.assertEqual("订单提交成功", text, "提交订单失败")
def test_immediately_sorce_lottery_case(self): '''在投注选号页面,点击右上角即时比分,打开赛事分析数据,点击页面下方的投注竞彩足球按钮,页面跳转到选号页,选择两场比赛,提交订单''' hp = HomePage_lexiu(self.driver) pbcn = PaintBallChooseNumber_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) pbc = PaintBallConfirm_lexiu(self.driver) sfcn = SingleFootChooseNumber_lexiu(self.driver) l = Login_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) t = There_D_choosenumber_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 hp.homepage_link() # 点击首页 hp.single_foot_link() ##点击竞足单关 pbcn.three_clock() # 点击右上角的。。。 pbcn.immediately() #点击即时比分 aa = pbcn.enter_analysis_page() #点击进入赛事分析 if aa == 1: pbcn.lottery_jczq_button() #点击【投注竞彩足球】 pbcn.Play_f() ###点击玩法 pbcn.Play_spf() ##点击让球胜平负 aa = sfcn.jzdg_spf_choose(2) ###随机点击2场比赛 if aa == 2: pbcn.confirm_match() ###点击确认赛事 cl.submit_order_to_station_owner_button() #点击提交订单给站主 cl.confirm_and_pay_button() #点击确认支付 hp.Moveable_float_close() text1 = sos.submit_order_success() #获取提交订单成功文本 self.assertEqual('订单提交成功', text1)
def test_threestar_choose_one_continue_buy_caizhong_case(self): '''验证购买成功页【点击继续投注该彩种】,页面跳转至选号页面''' hp = HomePage_lexiu(self.driver) hp.open() l = Login_lexiu(self.driver) efcn = ElevenFiveChooseNumber_lexiu(self.driver) efcl = EleChooseFiveConfirmLottery_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) od = OrderDetails_lexiu(self.driver) hp.Moveable_float_close() #点击关闭浮窗 hp.My_lottery_ticket() #点击我的彩票 l.login_lexiu() #点击登录 hp.homepage_link() #点击首页 hp.Moveable_float_close() # 点击关闭浮窗 hp.cqssc_link() #点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_lexiu(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_choose_number_history_recommendation_num_case(self): '''选号页面,右上方隐藏的“历史走势”按钮,点击【使用推荐号码】,提交订单''' hp = HomePage_lexiu(self.driver) hp.open() l = Login_lexiu(self.driver) efcn = ElevenFiveChooseNumber_lexiu(self.driver) ulcn = UnionLottoChooseNumber_lexiu(self.driver) ssc_cn = CQSSC_ChooseNumber_lexiu(self.driver) ht = HistoricalTrend_lexiu(self.driver) efcl = EleChooseFiveConfirmLottery_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) od = OrderDetails_lexiu(self.driver) hp.Moveable_float_close() # 点击关闭浮窗 hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 hp.homepage_link() # 点击首页 hp.cqssc_link() # 点击重庆时时彩链接 ulcn.There_clock() #点击。。。 ssc_cn.history_trend() #点击历史走势 ht.use_recommend_num_button() #点击使用推荐号码 efcn.confirm_number_button() # 点击确认选号 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("商品名称:乐秀赢球-重庆时时彩", trade_name)
def test_mix_lottery_case(self): '''多注(复式、单式组合)选号,提交订单''' hp = HomePage_lexiu(self.driver) hp.open() ulcn = UnionLottoChooseNumber_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) efcl = EleChooseFiveConfirmLottery_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) l = Login_lexiu(self.driver) ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.gd_11_5_link() # 点击广东11选5链接 efcn = ElevenFiveChooseNumber_lexiu(self.driver) efcn.countdown_text() # 检查“距离第xxx期截止:”文案是否存在 efcn.spread_mode_button() ##选择展开玩法 efcn.mode_choose(23, 1) # 广东11选5任选二 efcn.hand_options(2) # 任选两个号 efcn.confirm_number_button() # 点击确认选号 efcl.continue_choose_num() # 点击继续选号 efcn.hand_options(3) # 任选两个号码 efcn.confirm_number_button() # 点击确认选号 efcl.submit_order_button() # 点击提交订单给站主 l.login_lexiu() # 点击登录 efcl.submit_order_button() # 点击提交订单给站主 text1 = efcl.lottery_chase_throw_text() #获取期数和投注倍数 self.assertIn("4注1期1倍", text1) 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)
def test_threestar_choose_one_continue_buy_case(self): '''验证订单详情页【继续购买该方案】页面跳转至投注确认页,流程''' hp = HomePage_lexiu(self.driver) hp.open() l = Login_lexiu(self.driver) efcn = ElevenFiveChooseNumber_lexiu(self.driver) efcl = EleChooseFiveConfirmLottery_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) od = OrderDetails_lexiu(self.driver) hp.Moveable_float_close() #点击关闭浮窗 hp.My_lottery_ticket() #点击我的彩票 l.login_lexiu() #点击登录 hp.homepage_link() #点击首页 hp.Moveable_float_close() # 点击关闭浮窗 hp.cqssc_link() #点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_lexiu(self.driver) ssc_cn.play_mode() #选择模式 ssc_cn.three_star() #选择三星 ssc_cn.baiwei_random(1) ssc_cn.shiwei_random(1) ssc_cn.gewei_random(1) efcn.confirm_number_button() # 点击确认选号 efcl.submit_order_button() # 点击提交订单给站主 cl.confirm_and_pay_button() # 点击确认并支付 hp.Moveable_float_close() # 如果出现浮层弹框,关闭 sos.check_order_details() # 点击查看订单详情 od.Scheme() #点击继续购买该方案 text = cl.lottery_confirm_num_page_text() self.assertEqual("投注确认", text, '页面未跳转至投注确认页') efcl.submit_order_button() # 点击提交订单给站主 cl.confirm_and_pay_button() # 点击确认并支付 text = sos.submit_order_success() # 获取页面“订单提交成功”文本 self.assertEqual("订单提交成功", text)
def test_fivestar_choose_double_case(self): '''五星直选玩法,每位各选多个号码并提交订单流程测试''' hp = HomePage_lexiu(self.driver) hp.open() l = Login_lexiu(self.driver) efcn = ElevenFiveChooseNumber_lexiu(self.driver) efcl = EleChooseFiveConfirmLottery_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) hp.Moveable_float_close() # 点击关闭浮窗 hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 hp.homepage_link() # 点击首页 hp.cqssc_link() # 点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_lexiu(self.driver) ssc_cn.play_mode() # 选择模式 ssc_cn.five_star() # 选择五星 ssc_cn.wanwei_random(2) ssc_cn.qianwei_random(2) ssc_cn.baiwei_random(2) self.driver.execute_script("window.scroll(0,300)") ssc_cn.shiwei_random(2) ssc_cn.gewei_random(2) aa = efcn.total_buy_text() self.assertIn("32注 ", aa) efcn.confirm_number_button() # 点击确认选号 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("商品名称:乐秀赢球-重庆时时彩", trade_name)
def test_orderdetails_continue_scheme_case(self): '''胆拖投注提交订单之后,查看订单详情,点击继续购买该方案,提交订单''' hp = HomePage_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.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 登录 hp.homepage_link() # 点击首页 hp.Moveable_float_close() hp.gd_11_5_link() # 点击广东11选5链接 efcn.spread_mode_button() # 展开玩法 efcn.mode_choose(23, 16) # 选择广东11选5胆拖模式任选二玩法 efcn.dantuo_choose_num(1, 2) # 选取1个胆码2个拖码 efcn.confirm_number_button() # 点击确认选号 efcl.submit_order_button() # 点击提交订单给站主 cl.confirm_and_pay_button() ##点击确认并支付 hp.Moveable_float_close() # 如果出现浮层弹框,关闭 sos.check_order_details() # 点击查看订单详情 od.Scheme() #点击继续投注该方案 num1 = efcl.Ele_five_select_number() # 获取投注确认页的选号 efcl.submit_order_button() # 点击提交订单给站主 cl.confirm_and_pay_button() ##点击确认并支付
def test_twostar_throw_chase2throw2_case(self): '''投注确认页,输入追2期投2倍,提交订单''' hp = HomePage_lexiu(self.driver) hp.open() l = Login_lexiu(self.driver) efcn = ElevenFiveChooseNumber_lexiu(self.driver) ulcn = UnionLottoChooseNumber_lexiu(self.driver) efcl = EleChooseFiveConfirmLottery_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) hp.Moveable_float_close() # 点击关闭浮窗 hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 hp.homepage_link() # 点击首页 hp.cqssc_link() # 点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_lexiu(self.driver) ssc_cn.play_mode() # 选择模式 ssc_cn.two_star() # 选择两星 ssc_cn.shiwei_random(2) ssc_cn.gewei_random(2) efcn.confirm_number_button() # 点击确认选号 efcl.chase_ticket_input(2) #输入追2期 efcl.throw_times_input(2) #输入投注倍数2倍 bb = efcl.lottery_chase_throw_text() # 获取注数倍数 self.assertIn("4注2期2倍", bb) 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("商品名称:乐秀赢球-重庆时时彩", trade_name)
def test_LotteryOderDetails_continue_buy_case(self): '''提交订单成功页,点击【继续购买该方案】,页面跳转至投注确认页''' ###点击进入大乐透进入大乐透选号页面### hp = HomePage_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() l = Login_lexiu(self.driver) hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 sos = SubmitOrderSuccess_lexiu(self.driver) hp.homepage_link() # 点击首页 hp.Moveable_float_close() hp.Lottery_link() # 点击大乐透链接 blcn = BigLotteryChooseNum_lexiu(self.driver) blcl = BigLotteryConfirmLottery_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) od = OrderDetails_lexiu(self.driver) ulcn = UnionLottoChooseNumber_lexiu(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() #点击确认支付 hp.Moveable_float_close() sos.check_order_details() #点击查看订单详情 mu2 = od.Betting_nu() #读取订单详情页号码 self.assertEqual(mu1, mu2, '订单详情页显示有误') od.Scheme() #点击继续购买此方案 mur = cl.confirm_num_page_text() self.assertEqual('提交订单给站主', mur)
def test_threestar_choose_all_case(self): '''二星直选玩法,个十百三位各选所有号码''' hp = HomePage_lexiu(self.driver) hp.open() l = Login_lexiu(self.driver) efcn = ElevenFiveChooseNumber_lexiu(self.driver) efcl = EleChooseFiveConfirmLottery_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) hp.Moveable_float_close() #点击关闭浮窗 hp.My_lottery_ticket() #点击我的彩票 l.login_lexiu() #点击登录 hp.homepage_link() #点击首页 hp.cqssc_link() #点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_lexiu(self.driver) ssc_cn.play_mode() #选择模式 ssc_cn.three_star() #选择三星 ssc_cn.baiwei_all() ssc_cn.shiwei_all() ssc_cn.gewei_all() aa = efcn.total_buy_text() self.assertIn("1000注 ", aa) efcn.confirm_number_button() # 点击确认选号 efcl.submit_order_button() # 点击提交订单给站主 cl.confirm_and_pay_button() # 点击确认并支付 hp.Moveable_float_close() # 如果出现浮层弹框,关闭 text = sos.submit_order_success() # 获取页面“订单提交成功”文本 self.assertEqual("订单提交成功", text) hp.Moveable_float_close() # 如果出现浮层弹框,关闭 trade_name = sos.trade_name_text() # 获取页面商品名称文本 self.assertIn("商品名称:乐秀赢球-重庆时时彩", trade_name)
def test_SuccessPage_continue_buy_case(self): '''订单详情页,点击【点击投注大乐透】,页面跳转至选号页面,选择一注,提交订单''' ###点击进入大乐透进入大乐透选号页面### hp = HomePage_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() l = Login_lexiu(self.driver) hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 sos = SubmitOrderSuccess_lexiu(self.driver) hp.homepage_link() # 点击首页 hp.Moveable_float_close() hp.Lottery_link() # 点击大乐透链接 blcn = BigLotteryChooseNum_lexiu(self.driver) blcl = BigLotteryConfirmLottery_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) od = OrderDetails_lexiu(self.driver) ulcn = UnionLottoChooseNumber_lexiu(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_Lottery_information_buy_case(self): """进入开奖公告,点击投注双色球,进入双色球投注页面,选1注号码""" ha = HomePage_lexiu(self.driver) hl = Login_lexiu(self.driver) hb = UnionLottoChooseNumber_lexiu(self.driver) hc = ConfirmLottery_lexiu(self.driver) hd = PaymetMode_lexiu(self.driver) he = BaofooPayment_lexiu(self.driver) hf = ChooseBank_lexiu(self.driver) hf1 = SubmitOrderSuccess_lexiu(self.driver) hf2 = LessPaySucess_lexiu(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.Lottery_information() ##点击开奖信息 hb.Lottery_information_unionlotto() ##点击开奖信息中的双色球 hc.Unionlotto_History_buy() ###点击双色球最近的开奖信息 hc.Buy_unionlotto() ##点击投注双色球 hb.u_red_label6() # 任意选择6个红球 hb.u_bule_label1() # 任意选择1个蓝球 hb.Confirm_button() # 点击确认选号按钮 hc.submit_order_to_station_owner_button() # 点击提交给站主 hl.login_lexiu() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付 text1 = hf1.submit_order_success() # 获取提交订单成功文本 self.assertEqual('订单提交成功', text1)
def test_many_lottery_ckick_x_once_case(self): '''在投注确认页面,多注号码,点击左边X按钮,投注号码减少一注''' ###点击进入大乐透进入大乐透选号页面### hp = HomePage_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() l = Login_lexiu(self.driver) hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 sos = SubmitOrderSuccess_lexiu(self.driver) hp.homepage_link() # 点击首页 hp.Moveable_float_close() hp.Lottery_link() # 点击大乐透链接 blcn = BigLotteryChooseNum_lexiu(self.driver) blcl = BigLotteryConfirmLottery_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) od = OrderDetails_lexiu(self.driver) ulcn = UnionLottoChooseNumber_lexiu(self.driver) ulcn.machine_choose_button() #点击机选按钮 ulcn.machine_choose_five_button() #点击机选5注 num = cl.event_count() # 获取总共有多少注 cl.Del_x() #点击单个删除x num1 = cl.lottery_number_text() # 获取注数 self.assertIn("4", num1) cl.submit_order_to_station_owner_button() # 点击提交订单给站主 cl.confirm_and_pay_button() # 点击确认并支付 hp.Moveable_float_close() # 如果出现浮层弹框,关闭 text = sos.submit_order_success() # 获取页面“订单提交成功”文本 self.assertEqual("订单提交成功", text) hp.Moveable_float_close() # 如果出现浮层弹框,关闭 trade_name = sos.trade_name_text() # 获取页面商品名称文本 self.assertIn("商品名称:乐秀赢球-大乐透", trade_name)
def test_Lottery_Hand_r19_case(self): '''大乐透选取19个红球,第19个红球提示“红球不能超过18个”测试''' ###点击进入大乐透选号页面### hp = HomePage_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.Lottery_link() # 点击大乐透链接 blcn = BigLotteryChooseNum_lexiu(self.driver) blcn.l_red_label19() # 选取19个红球 text = blcn.out_of_num() #获取超过18个红球时的toast提示信息 self.assertIn("红球不能超过18个", text) blcn.l_bule_label2() #选取2个蓝球 ulcn = UnionLottoChooseNumber_lexiu(self.driver) ulcn.Confirm_button() # 点击确认选号按钮 cl = ConfirmLottery_lexiu(self.driver) cl.submit_order_to_station_owner_button() # 提交订单给站主 l = Login_lexiu(self.driver) #####用户登录###### #l.new_user_login_tab() # 切换到新用户登录 l.login_lexiu() cl.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 cl.confirm_and_pay_button() # 点击“确认并支付”按钮 '''断言验证提交订单成功''' sos = SubmitOrderSuccess_lexiu(self.driver) hp.Moveable_float_close() text = sos.submit_order_success() self.assertEqual("订单提交成功", text, "提交订单失败")
def test_lottery_success_page_continue_lottery_case( self): #####################-----------------mj20171215 '''验证投注成功页【继续投注该彩种】按钮,点击页面跳转至竞彩足球选号页面''' hp = HomePage_lexiu(self.driver) pbcn = PaintBallChooseNumber_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) pbc = PaintBallConfirm_lexiu(self.driver) sfcn = SingleFootChooseNumber_lexiu(self.driver) l = Login_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) t = There_D_choosenumber_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 hp.homepage_link() # 点击首页 hp.single_foot_link() ##点击竞足单关 pbcn.Play_f() ###点击玩法 pbcn.Play_spf() ##点击让球胜平负 aa = sfcn.jzdg_spf_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_spf() ##点击让球胜平负 bb = sfcn.jzdg_spf_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_Lottery_Hand_r18b16_case(self): '''大乐透选取18个红球,12个蓝球提示“投注金额不能大于100000元”测试''' ###点击进入大乐透选号页面### hp = HomePage_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.Lottery_link() # 点击大乐透链接 blcn = BigLotteryChooseNum_lexiu(self.driver) blcn.l_red_label18() # 选取18个红球 blcn.l_bule_label12() #选取12个蓝球 ulcn = UnionLottoChooseNumber_lexiu(self.driver) ulcn.Confirm_button() # 点击确认选号按钮 cl = ConfirmLottery_lexiu(self.driver) cl.submit_order_to_station_owner_button() # 提交订单给站主 l = Login_lexiu(self.driver) #####用户登录###### #l.new_user_login_tab() # 切换到新用户登录 l.login_lexiu() cl.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 cl.confirm_and_pay_button() #点击确认并支付按钮 text = cl.out_max_pay() #获取超额提示信息文本 self.assertIn("投注金额不能大于100000元", text) cl.re_selection_num() #点击重新选号链接 blcn.l_bule_label12() #取消选中的12个蓝球 blcn.l_bule_label2() #选取2个蓝球 ulcn.Confirm_button() #点击确认选号 sleep(2) #系统限制,操作订单不能过于频繁 cl.submit_order_to_station_owner_button() #提交订单给站主 cl.confirm_and_pay_button() #确认支付 '''断言验证提交订单成功''' sos = SubmitOrderSuccess_lexiu(self.driver) hp.Moveable_float_close() text = sos.submit_order_success() self.assertEqual("订单提交成功", text, "提交订单失败")
def test_function_instruct_case(self): '''验证订单详情页【功能说明】,能正常打开和关闭''' hp = HomePage_lexiu(self.driver) pbcn = PaintBallChooseNumber_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) pbc = PaintBallConfirm_lexiu(self.driver) l = Login_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) od = OrderDetails_lexiu(self.driver) sfcn = SingleFootChooseNumber_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 hp.homepage_link() # 点击首页 hp.single_foot_link() ##点击竞彩足球 pbcn.Play_f() ###点击玩法 pbcn.Play_spf() ##点击让球胜平负 aa = sfcn.jzdg_spf_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() # 点击查看详情 self.driver.execute_script("window.scroll(0,200)") #鼠标滑动200px od.function_instruct() #点击功能说明 od.i_know() #点击【知道了】
def test_Lottery_re_r18b1_case(self): '''大乐透重复选号取消选中测试''' ###点击进入大乐透选号页面### hp = HomePage_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.Lottery_link() # 点击大乐透链接 blcn = BigLotteryChooseNum_lexiu(self.driver) blcn.l_rechoose_red_label18() #随机选中18个红球,再取消选中的红球 blcn.l_red_label18() #重新选取18个红球 blcn.l_bule_label2() #选取2个蓝球 ulcn = UnionLottoChooseNumber_lexiu(self.driver) ulcn.Confirm_button() #点击确认选号按钮 cl = ConfirmLottery_lexiu(self.driver) cl.submit_order_to_station_owner_button() # 提交订单给站主 l = Login_lexiu(self.driver) #####用户登录###### #l.new_user_login_tab() # 切换到新用户登录 l.login_lexiu() cl.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 cl.confirm_and_pay_button() # 点击确认并支付按钮 '''断言验证提交订单成功''' sos = SubmitOrderSuccess_lexiu(self.driver) hp.Moveable_float_close() text = sos.submit_order_success() self.assertEqual("订单提交成功", text, "提交订单失败")
def test_handover_paly_case(self): '''胜平负玩法,在投注确认页面,点击编辑赛事,回到选号选号页面,切换玩法为混合投注,任选两场赛事,提交订单,订单详情显示为混合投注''' hp = HomePage_lexiu(self.driver) pbcn = PaintBallChooseNumber_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) pbc = PaintBallConfirm_lexiu(self.driver) sfcn = SingleFootChooseNumber_lexiu(self.driver) l = Login_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) od = OrderDetails_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 hp.homepage_link() # 点击首页 hp.single_foot_link() ##点击竞足单关 pbcn.Play_f() ###点击玩法 pbcn.Play_spf() ##点击胜平负 aa = sfcn.jzdg_spf_choose(2) # 选择2场赛事 if aa == 2: pbcn.confirm_match() ###点击确认赛事 pbc.Add_event() # 点击编辑赛事 pbcn.Play_f() ###点击玩法 pbcn.Play_mix() ##点击混合玩法 sfcn.Paintball_single_mix_nus_a(2) #选择两场赛事 pbcn.confirm_match() ###点击确认赛事 cl.submit_order_to_station_owner_button() # 点击提交订单给站主 cl.confirm_and_pay_button() # 点击确认支付 sleep(5) text1 = sos.submit_order_success() # 获取提交订单成功文本 self.assertEqual('订单提交成功', text1)
def test_Lottery_multiphase_machine_choose5_case(self): """选号页面,右上方隐藏的多期机选,5期提交订单""" ###点击进入大乐透进入大乐透选号页面### hp = HomePage_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.Lottery_link() #点击大乐透链接 blcn = BigLotteryChooseNum_lexiu(self.driver) blcl = BigLotteryConfirmLottery_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) od = OrderDetails_lexiu(self.driver) ulcn = UnionLottoChooseNumber_lexiu(self.driver) ulcn.There_clock() #点击。。。 ulcn.Many_pause() #点击多期机选 ulcn.many_machine_choose(5) #点击5期 text1 = ulcn.many_machine_choose_text() self.assertIn("1注 5期 1倍", text1, '多期机选有误') ulcn.Many_pause_confirm() #点击多期机选页的【提交订单】 #####用户登录###### l = Login_lexiu(self.driver) l.login_lexiu() ulcn.There_clock() # 点击。。。 ulcn.Many_pause() # 点击多期机选 ulcn.many_machine_choose(5) # 点击5期 ulcn.Many_pause_confirm() # 点击多期机选页的【提交订单】 cl.confirm_and_pay_button() # 点击“确认并支付”按钮 '''断言验证提交订单成功''' sos = SubmitOrderSuccess_lexiu(self.driver) hp.Moveable_float_close() text = sos.submit_order_success() self.assertEqual("订单提交成功", text, "提交订单失败")
def test_onestar_machine_choose_five_delete_one_case(self): '''机选5注,投注确认页,点击【单个删除投注】图标,投注注数减少一注,提交订单''' hp = HomePage_lexiu(self.driver) hp.open() l = Login_lexiu(self.driver) efcn = ElevenFiveChooseNumber_lexiu(self.driver) efcl = EleChooseFiveConfirmLottery_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) ulcn = UnionLottoChooseNumber_lexiu(self.driver) hp.Moveable_float_close() # 点击关闭浮窗 hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 hp.homepage_link() # 点击首页 hp.cqssc_link() # 点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_lexiu(self.driver) ssc_cn.play_mode() # 选择模式 ssc_cn.one_star() # 选择一星 ulcn.machine_choose_button() # 点击机选 ulcn.machine_choose_five_button() # 机选5注 num=cl.event_count()#获取总共有多少注 cl.del_n(5) # 选择删除第5场投注 num1 = cl.event_count()#获取删除后的场数 self.assertEqual(num-1,num1) bb = efcl.lottery_chase_throw_text() # 获取注数倍数 self.assertIn("4注1期1倍", bb) efcl.submit_order_button() # 点击提交订单给站主 cl.confirm_and_pay_button() # 点击确认并支付 hp.Moveable_float_close() # 如果出现浮层弹框,关闭 text = sos.submit_order_success() # 获取页面“订单提交成功”文本 self.assertEqual("订单提交成功", text) hp.Moveable_float_close() # 如果出现浮层弹框,关闭 trade_name = sos.trade_name_text() # 获取页面商品名称文本 self.assertIn("商品名称:乐秀赢球-重庆时时彩", trade_name)
def test_Lottery_multiphase_machine_single_radio_case(self): """选号页面,右上方隐藏的多期机选,点击追加单选按钮,提交订单""" ###点击进入大乐透进入大乐透选号页面### hp = HomePage_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() l = Login_lexiu(self.driver) hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 hp.homepage_link() # 点击首页 hp.Moveable_float_close() hp.Lottery_link() #点击大乐透链接 blcn = BigLotteryChooseNum_lexiu(self.driver) blcl = BigLotteryConfirmLottery_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) od = OrderDetails_lexiu(self.driver) ulcn = UnionLottoChooseNumber_lexiu(self.driver) ulcn.There_clock() #点击。。。 ulcn.Many_pause() #点击多期机选 ulcn.many_chase_radio() #点击多期机选的单选按钮 text1 = ulcn.many_machine_choose_text() ulcn.Many_pause_confirm() #点击多期机选页的【提交订单】 cl.confirm_and_pay_button() # 点击“确认并支付”按钮 '''断言验证提交订单成功''' sos = SubmitOrderSuccess_lexiu(self.driver) hp.Moveable_float_close() text = sos.submit_order_success() self.assertEqual("订单提交成功", text, "提交订单失败")
def test_onestar_machine_choose_one_cancel_delete_all_case(self): '''机选1注,投注确认页,点击【删除所有投注】图标【取消】删除,提交订单''' hp = HomePage_lexiu(self.driver) hp.open() l = Login_lexiu(self.driver) efcn = ElevenFiveChooseNumber_lexiu(self.driver) efcl = EleChooseFiveConfirmLottery_lexiu(self.driver) cl = ConfirmLottery_lexiu(self.driver) sos = SubmitOrderSuccess_lexiu(self.driver) ulcn = UnionLottoChooseNumber_lexiu(self.driver) hp.Moveable_float_close() # 点击关闭浮窗 hp.My_lottery_ticket() # 点击我的彩票 l.login_lexiu() # 点击登录 hp.homepage_link() # 点击首页 hp.cqssc_link() # 点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_lexiu(self.driver) ssc_cn.play_mode() # 选择模式 ssc_cn.one_star()#选择一星 ulcn.machine_choose_button()#点击机选 ulcn.machine_choose_one_button()#机选一注 efcn.confirm_number_button() # 点击确认选号 cl.delete_all_num_button()#删除所有选号 cl.cancel_delete_button()#取消删除 bb = efcl.lottery_chase_throw_text() # 获取注数倍数 self.assertIn("1注1期1倍", bb) efcl.submit_order_button() # 点击提交订单给站主 cl.confirm_and_pay_button() # 点击确认并支付 hp.Moveable_float_close() # 如果出现浮层弹框,关闭 text = sos.submit_order_success() # 获取页面“订单提交成功”文本 self.assertEqual("订单提交成功", text) hp.Moveable_float_close() # 如果出现浮层弹框,关闭 trade_name = sos.trade_name_text() # 获取页面商品名称文本 self.assertIn("商品名称:乐秀赢球-重庆时时彩", trade_name)
def test_Lottery_Machine_delete_all_num_cancel(self): '''测试提交订单页删除所有选号按钮,取消删除''' hp = HomePage_lexiu(self.driver) hp.open() hp.Moveable_float_close() # 关闭悬浮窗口 hp.Lottery_link() # 点击大乐透链接 ulcn = UnionLottoChooseNumber_lexiu(self.driver) ulcn.machine_choose_button() # 点击机选按钮 ulcn.machine_choose_five_button() # 点击机选5注 cl = ConfirmLottery_lexiu(self.driver) cl.delete_all_num_button() # 点击删除所有选号按钮 cl.cancel_delete_button() # 点击取消删除按钮 '''断言验证取消删除成功''' confirm_catchectic_text = cl.confirm_num_page_text() self.assertEqual("提交订单给站主", confirm_catchectic_text) print("我已放弃删除,回到了" + confirm_catchectic_text + "页") cl.submit_order_to_station_owner_button() # 提交订单给站主 l = Login_lexiu(self.driver) #l.new_user_login_tab() # 切换到新用户登录 l.login_lexiu() cl.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 cl.confirm_and_pay_button() # 点击“确认并支付”按钮 '''断言验证提交订单成功''' sos = SubmitOrderSuccess_lexiu(self.driver) hp.Moveable_float_close() # 关闭悬浮窗口 text = sos.submit_order_success() self.assertEqual("订单提交成功", text, "提交订单失败")