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_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_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_onestar_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.one_star() # 选择一星 ssc_cn.gewei_all() # 选择9个号码 aa = efcn.total_buy_text() self.assertIn("10注 ", 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_onestar_machine_five_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) 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.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) trade_name = sos.trade_name_text() # 获取页面商品名称文本 self.assertIn("商品名称:乐秀赢球-重庆时时彩", trade_name)
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_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)