def test_Lottery_Hand_r5b12_case(self): """大乐透手选5个红球12个蓝球购买流程测试""" ###点击进入大乐透进入大乐透选号页面### hp = HomePage(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.Lottery_link() # 点击大乐透链接 blcn = BigLotteryChooseNum(self.driver) blcn.l_red_label5() # 任意选择5个红球 blcn.l_bule_label12() # 任意选择12个蓝球 ulcn = UnionLottoChooseNumber(self.driver) ulcn.Confirm_button() # 点击确认选号按钮 cl = ConfirmLottery(self.driver) cl.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 #####用户登录###### l = Login(self.driver) l.new_user_login_tab() # 切换到新用户登录 l.login() cl.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 cl.confirm_and_pay_button() # 点击“确认并支付”按钮 '''断言验证提交订单成功''' sos = SubmitOrderSuccess(self.driver) hp.Moveable_float_close() text = sos.submit_order_success() self.assertEqual("订单提交成功", text, "提交订单失败")
def test_LotteryOderDetails_continue_buy_case(self): '''提交订单成功页,点击【继续购买该方案】,页面跳转至投注确认页''' ###点击进入大乐透进入大乐透选号页面### hp = HomePage(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() l = Login(self.driver) hp.My_lottery_ticket() # 点击我的彩票 l.login() # 点击登录 sos = SubmitOrderSuccess(self.driver) hp.homepage_link() # 点击首页 hp.Moveable_float_close() hp.Lottery_link() # 点击大乐透链接 blcn = BigLotteryChooseNum(self.driver) blcl = BigLotteryConfirmLottery(self.driver) cl = ConfirmLottery(self.driver) od = OrderDetails(self.driver) ulcn = UnionLottoChooseNumber(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_SuccessPage_continue_buy_case(self): '''订单详情页,点击【点击投注大乐透】,页面跳转至选号页面,选择一注,提交订单''' ###点击进入大乐透进入大乐透选号页面### hp = HomePage(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() l = Login(self.driver) hp.My_lottery_ticket() # 点击我的彩票 l.login() # 点击登录 sos = SubmitOrderSuccess(self.driver) hp.homepage_link() # 点击首页 hp.Moveable_float_close() hp.Lottery_link() # 点击大乐透链接 blcn = BigLotteryChooseNum(self.driver) blcl = BigLotteryConfirmLottery(self.driver) cl = ConfirmLottery(self.driver) od = OrderDetails(self.driver) ulcn = UnionLottoChooseNumber(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.Continue_buy()#点击继续购买此彩种 blcn.l_red_label5() # 选择5个红球 blcn.l_bule_label2() # 选择2个蓝球 ulcn.Confirm_button() # 点击确认选号按钮
def test_Lottery_Hand_choose_single_chase_throws_case(self): """手动选号,单式,多注多倍,提交订单""" ###点击进入大乐透进入大乐透选号页面### hp = HomePage(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.Lottery_link()#点击大乐透链接 blcn = BigLotteryChooseNum(self.driver) blcl = BigLotteryConfirmLottery(self.driver) cl = ConfirmLottery(self.driver) blcn.l_red_label5()#任意选择5个红球 blcn.l_bule_label2()#任意选择2个蓝球 ulcn = UnionLottoChooseNumber(self.driver) ulcn.Confirm_button()#点击确认选号按钮 cl.chase_ticket_button() # 点击追xx期 blcl.additional_radio_button() # 点击追加单选按钮 cl.chase_ticket_button_two() # 点击追加2期单选按钮 cl.throw_times_input(3) # 输入投注倍数 num1=cl.lottery_number_text()#获取注数 chase = cl.chase_time_text()#获取追号期数 times = cl.throw_time_text()#获取倍数 self.assertEqual("123",num1+chase+times) cl.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 #####用户登录###### l = Login(self.driver) l.new_user_login_tab() # 切换到新用户登录 l.login() cl.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 cl.confirm_and_pay_button() # 点击“确认并支付”按钮 '''断言验证提交订单成功''' sos = SubmitOrderSuccess(self.driver) hp.Moveable_float_close() text = sos.submit_order_success() self.assertEqual("订单提交成功", text, "提交订单失败") '''######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作