def test_twostar_choose_all_case(self): '''二星直选玩法,个位选择9个号码十位选择9个号码''' 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.two_star() #选择两星 ssc_cn.shiwei_all() ssc_cn.gewei_all() aa = efcn.total_buy_text() self.assertIn("100注 ", 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_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_bigsmall_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.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) trade_name = sos.trade_name_text() # 获取页面商品名称文本 self.assertIn("商品名称:乐秀赢球-重庆时时彩", trade_name)
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_onestar_continue_fushi_choose(self): '''投注确认页,点击【继续选号】,页面跳转至选号页面,选择多个号码,提交订单''' 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.one_star() # 选择一星 ssc_cn.gewei_random(1) #选择1个号码 aa = efcn.total_buy_text() self.assertIn("1注", aa) efcn.confirm_number_button() # 点击确认选号 efcl.continue_choose_num() #点击继续选号 ssc_cn.gewei_random(3) # 选择1个号码 efcn.confirm_number_button() #确认选号 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) trade_name = sos.trade_name_text() # 获取页面商品名称文本 self.assertIn("商品名称:乐秀赢球-重庆时时彩", trade_name)
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_threestar_choose_one_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) #百十个位各选一个数字 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_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_onestar_machine_choose_one_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()#机选一注 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()#点击查看订单详情
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_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_onestar_clear_num_case(self): '''一星玩法,选择5号码,并清除,流程测试''' hp = HomePage_lexiu(self.driver) hp.open() l = Login_lexiu(self.driver) efcn = ElevenFiveChooseNumber_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() # 选择一星 ssc_cn.gewei_random(5) #选择5个号码 aa = efcn.total_buy_text() self.assertIn("5注", aa) ulcn.clear_number() #清除所有选号 cc = efcn.total_buy_text() self.assertIn("请至少选择1个号码", cc) ssc_cn.gewei_random(2) #选择2个号码 aa = efcn.total_buy_text() self.assertIn("2注", aa)
def test_onestar_choose_all_cancel_case(self): '''一星玩法,选择所有选号,并取消流程测试''' hp = HomePage_lexiu(self.driver) hp.open() l = Login_lexiu(self.driver) efcn = ElevenFiveChooseNumber_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() # 选择一星 ssc_cn.gewei_all() # 选择9个号码 ssc_cn.gewei_all() #取消选中的9个号码 aa = efcn.total_buy_text() self.assertIn("请至少选择1个号码", aa)
def test_onestar_machine_choose_five_delete_all_case(self): '''机选5注,投注确认页,点击【单个删除投注】图标,删除所有注数,跳转至选号页,手选复式(2注),提交订单''' 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()#获取总共有多少注 print("删除前共有%d场"%num) for i in range(1,(num+1)): cl.del_n(i) # 选择删除第5场投注 sleep(1) ssc_cn.gewei_random(2) efcn.confirm_number_button()#确认选号 bb = efcl.lottery_chase_throw_text() # 获取注数倍数 self.assertIn("2注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_threestar_choose_one_clear_num(self): '''选择一个号码,点击【清除所有选号】,重新选择一个号码,提交订单''' 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.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_threestar_choose_all_cancel_case(self): '''三星直选玩法,选择所有选号,再次点击取消流程''' hp = HomePage_lexiu(self.driver) hp.open() l = Login_lexiu(self.driver) efcn = ElevenFiveChooseNumber_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) ssc_cn.baiwei_all() ssc_cn.shiwei_all() ssc_cn.gewei_all() aa = efcn.total_buy_text() self.assertIn("请每位至少选择1个号码", aa)
def test_bigsmall_choose_all_cancel_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.big_little() # 选择大小单双 ssc_cn.ds_shiwei_all() # 十位选择所有号码 ssc_cn.ds_gewei_all() # 个位选择所有号码 aa = efcn.total_buy_text() self.assertIn("16注 ", aa) ssc_cn.ds_shiwei_all() # 十位选择取消所有号码 ssc_cn.ds_gewei_all() # 个位选择取消所有号码 aa = efcn.total_buy_text() self.assertIn("请至少每位选择1种属性", aa)
def test_intelligently_chase_input11_case(self): '''输入追11期,点击【提交】提交订单''' 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) ssc_cl = CQSSCConfirmLottery_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(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_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_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.five_star() # 选择五星 ssc_cn.wanwei_all() ssc_cn.qianwei_all() ssc_cn.baiwei_all() self.driver.execute_script("window.scroll(0,300)") ssc_cn.shiwei_all() ssc_cn.gewei_all() aa = efcn.total_buy_text() self.assertIn("100000注 ", aa) efcn.confirm_number_button() # 点击确认选号 efcl.submit_order_button() # 点击提交订单给站主 cl.confirm_and_pay_button() # 点击确认并支付 toast = cl.out_max_pay() self.assertEqual("投注金额不能大于100000元", toast)
def test_intelligently_chase_ravise_chase_input12_times_input3_confirm_revise_case( self): '''【修改方案】输入连续追12期,起始倍数,输入3倍,点击【确定】,【提交】提交订单''' 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) ssc_cl = CQSSCConfirmLottery_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(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_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)