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_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_fivestar_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.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) self.driver.execute_script("window.scroll(0,0)") 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("请每位至少选择1个号码", aa)