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_threestar_choose_one_continue_buy_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() #选择三星 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() #点击继续购买该方案 efcl.submit_order_button() # 点击提交订单给站主 cl.confirm_and_pay_button() # 点击确认并支付 text = cl.lottery_confirm_num_page_text() self.assertEqual("投注确认", text, '页面未跳转至投注确认页')
def test_threestar_choose_one_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) #百十个位各选一个数字 aa = efcn.total_buy_text() self.assertIn("1注 ", 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) sos.check_order_details() #点击查看订单详情 num2 = od.bet_number() #获取页面投注号码 self.assertIn(num1, num2)
def test_intelligently_chase_ravise_times_sub_confirm_revise_case(self): '''【修改方案】起始倍数,点击-,点击【确定】,【提交】提交订单''' hp = HomePage_leyou(self.driver) ulcn = UnionLottoChooseNumber_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) efcl = EleChooseFiveConfirmLottery_leyou(self.driver) ssc_cl = CQSSCConfirmLottery_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.sd_11_5_link() # 点击山东11选5链接 efcn.spread_mode_button() # 展开玩法 efcn.mode_choose(22, 1) # 广西11选5任选二 efcn.hand_options(2) # 任选2个号 efcn.confirm_number_button() # 点击确认选号 text1 = efcl.lottery_chase_throw_text() self.assertIn("1注1期1倍", text1) ssc_cl.intelligently_chase_button() # 点击智能追号 ssc_cl.revise_button() # 点击修改方案 ssc_cl.revise_times_input(3) ssc_cl.revise_confirm() # 点击确认修改 text = ssc_cl.totalIssue_text() ssc_cl.revise_button() # 点击修改方案 ssc_cl.revise_times_sub() # 点击起始倍数的- ssc_cl.revise_confirm() # 点击确认修改 text1 = ssc_cl.totalIssue_text() self.assertNotEqual(text1, text, '倍数没有被修改') # 检查是否修改追号期数 ssc_cl.submit_button() # 点击提交按钮 cl.confirm_and_pay_button() # 点击确认支付 hp.Moveable_float_close() # 如果出现浮层弹框,关闭 text2 = sos.submit_order_success() # 获取页面“订单提交成功”文本 self.assertEqual("订单提交成功", text2) trade_name = sos.trade_name_text() # 获取页面商品名称文本 self.assertIn("商品名称:乐优炫彩-山东11选5", trade_name)
def test_threestar_choose_one_clear_num(self): '''选择一个号码,点击【清除所有选号】,重新选择一个号码,提交订单''' hp = HomePage_leyou(self.driver) hp.open() l = Login_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) ulcn = UnionLottoChooseNumber_leyou(self.driver) efcl = EleChooseFiveConfirmLottery_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) sos = SubmitOrderSuccess_leyou(self.driver) hp.Moveable_float_close() # 点击关闭浮窗 hp.My_lottery_ticket() # 点击我的彩票 l.login_leyou() # 点击登录 hp.homepage_link() # 点击首页 hp.cqssc_link() # 点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_leyou(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) aa = efcn.total_buy_text() self.assertIn("1注 ", aa) ulcn.clear_number() #清除所有选号 cc = efcn.total_buy_text() self.assertIn("请每位至少选择1个号码", cc) ssc_cn.baiwei_random(2) ssc_cn.shiwei_random(2) ssc_cn.gewei_random(2) bb = efcn.total_buy_text() self.assertIn("8注 ", bb) efcn.confirm_number_button() # 点击确认选号 bb = efcl.lottery_chase_throw_text() # 获取注数倍数 self.assertIn("8注1期1倍", 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_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)
def test_intelligently_chase_ravise_chase_input12_cancel_revise_case(self): '''【修改方案】输入连续追号12期,点击【取消】,【提交】提交订单''' hp = HomePage_leyou(self.driver) ulcn = UnionLottoChooseNumber_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) efcl = EleChooseFiveConfirmLottery_leyou(self.driver) ssc_cl = CQSSCConfirmLottery_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) # 任选2个号 efcn.confirm_number_button() # 点击确认选号 text1 = efcl.lottery_chase_throw_text() self.assertIn("1注1期1倍", text1) ssc_cl.intelligently_chase_button() # 点击智能追号 text2 = ssc_cl.totalIssue_num() # 获取追号期数文本 ssc_cl.revise_button() #点击修改方案 ssc_cl.revise_chase_input(12) #追号的输入框输入12 ssc_cl.revise_cancel() #点击取消修改 text = ssc_cl.totalIssue_text() self.assertIn(str(text2), text) # 检查是否修改追号期数 ssc_cl.submit_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)
def test_intelligently_chase_ravise_chase_input12_times_input3_confirm_revise_case( self): '''【修改方案】输入连续追12期,起始倍数,输入3倍,点击【确定】,【提交】提交订单''' hp = HomePage_leyou(self.driver) hp.open() l = Login_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) ulcn = UnionLottoChooseNumber_leyou(self.driver) efcl = EleChooseFiveConfirmLottery_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) ssc_cl = CQSSCConfirmLottery_leyou(self.driver) sos = SubmitOrderSuccess_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.five_star() # 选择五星 ssc_cn.wanwei_random(1) ssc_cn.qianwei_random(1) ssc_cn.baiwei_random(1) self.driver.execute_script("window.scroll(0,300)") ssc_cn.shiwei_random(1) ssc_cn.gewei_random(1) efcn.confirm_number_button() # 确认选号 ssc_cl.intelligently_chase_button() # 点击智能追号 text = ssc_cl.totalIssue_text() ssc_cl.revise_button() #点击修改方案 ssc_cl.revise_chase_input(12) #追号的输入框输入12 ssc_cl.revise_times_input(3) #起始倍数输入框输入3 ssc_cl.revise_confirm() #点击确认修改 text1 = ssc_cl.totalIssue_text() self.assertIn('12', text1, '追号期数修改失败') # 检查是否修改追号期数 self.assertNotEqual(text, text1) ssc_cl.submit_button() # 点击提交按钮 cl.confirm_and_pay_button() # 点击确认支付 hp.Moveable_float_close() # 如果出现浮层弹框,关闭 text2 = sos.submit_order_success() # 获取页面“订单提交成功”文本 self.assertEqual("订单提交成功", text2) trade_name = sos.trade_name_text() # 获取页面商品名称文本 self.assertIn("商品名称:乐优炫彩-重庆时时彩", trade_name)
def test_Lottery_multiphase_machine_single_radio_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() # 点击登录 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) 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_leyou(self.driver) hp.Moveable_float_close() text = sos.submit_order_success() self.assertEqual("订单提交成功", text, "提交订单失败")
def test_intelligently_chase_input11_case(self): '''输入追11期,点击【提交】提交订单''' hp = HomePage_leyou(self.driver) hp.open() l = Login_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) ulcn = UnionLottoChooseNumber_leyou(self.driver) efcl = EleChooseFiveConfirmLottery_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) ssc_cl = CQSSCConfirmLottery_leyou(self.driver) sos = SubmitOrderSuccess_leyou(self.driver) hp.Moveable_float_close() # 点击关闭浮窗 hp.My_lottery_ticket() # 点击我的彩票 l.login_leyou() # 点击登录 hp.homepage_link() # 点击首页 hp.cqssc_link() # 点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_leyou(self.driver) ssc_cn.play_mode() # 选择模式 ssc_cn.five_star() # 选择五星 ssc_cn.wanwei_random(1) ssc_cn.qianwei_random(1) ssc_cn.baiwei_random(1) self.driver.execute_script("window.scroll(0,300)") ssc_cn.shiwei_random(1) ssc_cn.gewei_random(1) efcn.confirm_number_button() #确认选号 ssc_cl.intelligently_chase_button() #点击智能追号 text2 = ssc_cl.totalIssue_num() #获取追号期数文本 ssc_cl.znzh_issue_num_input(11) #输入追11期 ssc_cl.totalIssue() #更新追号期数 text = ssc_cl.totalIssue_text() self.assertIn(str(text2 + 1), text) #检查是否修改追号期数 ssc_cl.submit_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_fivestar_choose_double_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) hp.Moveable_float_close() # 点击关闭浮窗 hp.My_lottery_ticket() # 点击我的彩票 l.login_leyou() # 点击登录 hp.homepage_link() # 点击首页 hp.cqssc_link() # 点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_leyou(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) hp.Moveable_float_close() # 如果出现浮层弹框,关闭 trade_name = sos.trade_name_text() # 获取页面商品名称文本 self.assertIn("商品名称:乐优炫彩-重庆时时彩", trade_name)
def test_twostar_throw_chase2throw2_case(self): '''投注确认页,输入追2期投2倍,提交订单''' hp = HomePage_leyou(self.driver) hp.open() l = Login_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) ulcn = UnionLottoChooseNumber_leyou(self.driver) efcl = EleChooseFiveConfirmLottery_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) sos = SubmitOrderSuccess_leyou(self.driver) hp.Moveable_float_close() # 点击关闭浮窗 hp.My_lottery_ticket() # 点击我的彩票 l.login_leyou() # 点击登录 hp.homepage_link() # 点击首页 hp.cqssc_link() # 点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_leyou(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_orderdetails_continue_scheme_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, 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_intelligently_input_periods_case(self): '''进入智能追号页面,输入追11期,点击【提交】提交订单''' hp = HomePage_leyou(self.driver) ulcn = UnionLottoChooseNumber_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) efcl = EleChooseFiveConfirmLottery_leyou(self.driver) ssc_cl = CQSSCConfirmLottery_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.sd_11_5_link() # 点击山东11选5链接 efcn.spread_mode_button() # 展开玩法 efcn.mode_choose(22, 1) # 广西11选5任选二 efcn.hand_options(2) # 任选2个号 efcn.confirm_number_button() # 点击确认选号 text1 = efcl.lottery_chase_throw_text() self.assertIn("1注1期1倍", text1) ssc_cl.intelligently_chase_button() # 点击智能追号 text2 = ssc_cl.totalIssue_num() # 获取追号期数文本 ssc_cl.znzh_issue_num_input(11) # 输入追11期 ssc_cl.totalIssue() # 更新追号期数 text = ssc_cl.totalIssue_text() self.assertIn(str(text2 + 1), text) # 检查是否修改追号期数 ssc_cl.submit_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)
def test_choose_number_history_recommendation_num_case(self): '''选号页面,右上方隐藏的“历史走势”按钮,点击【使用推荐号码】,提交订单''' hp = HomePage_leyou(self.driver) hp.open() l = Login_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) ulcn = UnionLottoChooseNumber_leyou(self.driver) ssc_cn = CQSSC_ChooseNumber_leyou(self.driver) ht = HistoricalTrend_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() # 点击重庆时时彩链接 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_many_lottery_ckick_x_once_case(self): '''在投注确认页面,多注号码,点击左边X按钮,投注号码减少一注''' ###点击进入大乐透进入大乐透选号页面### 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) ulcn.machine_choose_button() #点击机选按钮 ulcn.machine_choose_five_button() #点击机选5注 sleep(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_threestar_choose_all_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) hp.Moveable_float_close() #点击关闭浮窗 hp.My_lottery_ticket() #点击我的彩票 l.login_leyou() #点击登录 hp.homepage_link() #点击首页 hp.cqssc_link() #点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_leyou(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_immediately_sorce_lottery_case(self): '''在投注选号页面,点击右上角即时比分,打开赛事分析数据,点击页面下方的投注竞彩足球按钮,页面跳转到选号页,选择两场比赛,提交订单''' hp = HomePage_leyou(self.driver) pbcn = PaintBallChooseNumber_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) pbc = PaintBallConfirm_leyou(self.driver) sfcn = SingleFootChooseNumber_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.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_many_lottery_many_times_case(self): '''复式多注,进入智能追号页面,默认追期,提交订单''' hp = HomePage_leyou(self.driver) ulcn = UnionLottoChooseNumber_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) efcl = EleChooseFiveConfirmLottery_leyou(self.driver) ssc_cl = CQSSCConfirmLottery_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(4) # 任选4个号 efcn.confirm_number_button() # 点击确认选号 text1 = efcl.lottery_chase_throw_text() self.assertIn("6注1期1倍", text1) efcl.continue_choose_num() #点击继续选号 efcn.hand_options(4) #点击任选4个号码 efcn.confirm_number_button() # 点击确认选号 text2 = efcl.lottery_chase_throw_text() self.assertIn("12注1期1倍", text2) ssc_cl.intelligently_chase_button() # 点击智能追号 ssc_cl.submit_button() # 点击提交订单
def test_check_order_details_case(self): '''验证点击【查看订单详情】页面跳转至订单详情页''' hp = HomePage_leyou(self.driver) pbcn = PaintBallChooseNumber_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) pbc = PaintBallConfirm_leyou(self.driver) sfcn = SingleFootChooseNumber_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.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_onestar_machine_five_case(self): '''投注确认页,点击【机选5注】,提交订单''' hp = HomePage_leyou(self.driver) hp.open() l = Login_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) ulcn = UnionLottoChooseNumber_leyou(self.driver) efcl = EleChooseFiveConfirmLottery_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) sos = SubmitOrderSuccess_leyou(self.driver) hp.Moveable_float_close() # 点击关闭浮窗 hp.My_lottery_ticket() # 点击我的彩票 l.login_leyou() # 点击登录 hp.homepage_link() # 点击首页 hp.cqssc_link() # 点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_leyou(self.driver) ssc_cn.play_mode() # 选择模式 ssc_cn.one_star() # 选择一星 ssc_cn.gewei_random(1) # 选择1个号码 aa = efcn.total_buy_text() self.assertIn("1注", aa) efcn.confirm_number_button() # 点击确认选号 efcl.machine_choose_five()#点击机选5注 bb = efcl.lottery_chase_throw_text() # 获取注数倍数 self.assertIn("6注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_bigsmall_choose_double_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) hp.Moveable_float_close() # 点击关闭浮窗 hp.My_lottery_ticket() # 点击我的彩票 l.login_leyou() # 点击登录 hp.homepage_link() # 点击首页 hp.cqssc_link() # 点击重庆时时彩链接 ssc_cn = CQSSC_ChooseNumber_leyou(self.driver) ssc_cn.play_mode() # 选择模式 ssc_cn.big_little() # 选择大小单双 ssc_cn.ds_shiwei_all() # 十位选择所有号码 ssc_cn.ds_gewei_all() # 个位选择所有号码 aa = efcn.total_buy_text() self.assertIn("16注 ", 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)