def test_Lottery_Hand_history_one_bet_one_times_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) od = OrderDetails(self.driver) ulcn=UnionLottoChooseNumber(self.driver) ulcn.There_clock()#点击。。。 ulcn.History_movements()#点击历史走势 ulcn.Red_movements()#点击红球走势 ulcn.History_red(5)#点击5个红球 ulcn.Bule_movements()#点击蓝球走势 blcn.bule_history_choose(2)#点击2个蓝球 ulcn.Recommended_number()#点击【使用已选号码】 ulcn.Confirm_button() # 点击确认选号按钮 num1 = cl.lottery_number_text() # 获取注数 chase = cl.chase_time_text() # 获取追号期数 times = cl.throw_time_text() # 获取倍数 self.assertEqual("111", num1 + chase + times) mul1 = cl.Select_number()#获取投注确认页投注的号码 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, "提交订单失败") sos.check_order_details() ##点击查看订单详情 lottery2 = od.Betting_nu() ##读取显示的投注号码 self.assertEqual(mul1, lottery2)
def test_one_lottery_ckick_x_case(self): '''在投注确认页面,单注号码,点击左边X按钮,页面能跳转到选号页''' ###点击进入大乐透进入大乐透选号页面### hp = HomePage(self.driver) hd = ArrangeFiveConfirmLottery(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) ulcn.machine_choose_button()#点击机选按钮 ulcn.machine_choose_one_button()#点击机选1注 ulcn.Confirm_button() # 确认选号 mur = cl.lottery_number_text() self.assertEqual('1', mur) cl.Del_x() #点击单个删除x ulcn.machine_choose_button() # 点击机选按钮 ulcn.machine_choose_five_button() # 点击机选5注 num1 = cl.lottery_number_text() # 获取注数 self.assertIn("5", 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_Lottery_Hand_history_Recommended_number_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) ulcn=UnionLottoChooseNumber(self.driver) od = OrderDetails(self.driver) ulcn.History()#点击历史开奖 ulcn.click_history()#点击展开了的历史开奖 lottery1 = ulcn.Recommended_nu() # 读取推荐号码 ulcn.Recommended_number()#点击使用推荐号码 ulcn.Confirm_button() # 点击确认选号按钮 num1 = cl.lottery_number_text() # 获取注数 chase = cl.chase_time_text() # 获取追号期数 times = cl.throw_time_text() # 获取倍数 self.assertEqual("111", 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, "提交订单失败") sos.check_order_details() ##点击查看订单详情 lottery2 = od.Betting_number() ##读取显示的投注号码 self.assertEqual(lottery1, lottery2)
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,然后执行下一步操作
def test_Lottery_DanTuo_4_18_1_11_case(self): '''胆拖模式前区选择4个胆码,18个拖码,后区选择1个胆码,11个拖码测试流程''' hp = HomePage(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.Lottery_link() # 点击大乐透链接 blcn = BigLotteryChooseNum(self.driver) ulcn = UnionLottoChooseNumber(self.driver) ulcn.DanTuo_mode() # 选择胆拖模式 blcn.l_red_four_eighteen() # 红球选取4个胆码18个拖码 blcn.l_bule_one_eleven() # 后区选择1个胆码11个拖码 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, "提交订单失败")