def test_Investment_risk_case(self): '''投注确认页面,点击购彩风险,能够打开和关闭''' hp = HomePage_leyou(self.driver) ulcn = UnionLottoChooseNumber_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) efcl = EleChooseFiveConfirmLottery_leyou(self.driver) od = OrderDetails_leyou(self.driver) l = Login_leyou(self.driver) sos = SubmitOrderSuccess_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) hp.open() hp.Moveable_float_close() hp.gd_11_5_link() # 点击广东11选5链接 efcn.spread_mode_button() # 展开玩法 efcn.mode_choose(23, 1) # 广东11选5任选二 efcn.hand_options(2) # 任选两个号 sleep(2) efcn.confirm_number_button() # 点击确认选号 num1 = efcl.Ele_five_select_number() # 获取投注确认页的选号 cl.Risk() #点击《风险提示》 cl.Risk_know() #点击《我知道了》 efcl.submit_order_button() # 点击提交订单给站主 l.login_leyou() # 点击登录 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("商品名称:乐优炫彩-粤11选5", trade_name) sos.check_order_details() # 点击查看订单详情 num2 = od.Ele_five_betting_nu() # 获取订单详情页的号码 self.assertEqual(num1, num2)
def test_recommendation_many_lottery_many_times_case(self): '''选号页面,点开历史开奖,使用推荐号码投注(多注多倍),提交订单''' hp = HomePage_leyou(self.driver) tD = There_D_choosenumber_leyou(self.driver) ulcn = UnionLottoChooseNumber_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) efcl = EleChooseFiveConfirmLottery_leyou(self.driver) od = OrderDetails_leyou(self.driver) l = Login_leyou(self.driver) sos = SubmitOrderSuccess_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) hp.open() hp.Moveable_float_close() hp.gd_11_5_link() # 点击广东11选5链接 efcn.spread_mode_button() #展开玩法 efcn.mode_choose(23, 1) # 广东11选5任选二 ulcn.There_clock() # 点击选号页的。。。 efcn.history_trend() #点击历史走势 efcn.recommendation_choose_num(4) #选择两个号码 efcn.use_recommendation() #点击使用推荐号码 efcn.confirm_number_button() # 点击确认选号 num1 = efcl.Ele_five_select_number() #获取投注确认页的选号 efcl.submit_order_button() # 点击提交订单给站主 l.login_leyou() # 点击登录 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("商品名称:乐优炫彩-粤11选5", trade_name) sos.check_order_details() #点击查看订单详情 num2 = od.Ele_five_betting_nu() #获取订单详情页的号码 self.assertEqual(num1, num2)
def test_orderdetails_page_continue_buy_case(self): '''订单详情页面,点击继续购买该方案,可以跳转到选号确认页面,提交订单''' hp = HomePage_leyou(self.driver) ulcn = UnionLottoChooseNumber_leyou(self.driver) efcn = ElevenFiveChooseNumber_leyou(self.driver) efcl = EleChooseFiveConfirmLottery_leyou(self.driver) od = OrderDetails_leyou(self.driver) l = Login_leyou(self.driver) sos = SubmitOrderSuccess_leyou(self.driver) cl = ConfirmLottery_leyou(self.driver) hp.open() hp.Moveable_float_close() hp.My_lottery_ticket() #点击我的彩票 l.login_leyou() #登录 hp.homepage_link() #点击首页 hp.Moveable_float_close() hp.gd_11_5_link() # 点击广东11选5链接 efcn.spread_mode_button() # 展开玩法 efcn.mode_choose(23, 1) # 广东11选5任选二 efcn.hand_options(2) # 任选两个号 efcn.confirm_number_button() # 点击确认选号 efcl.submit_order_button() # 点击提交订单给站主 cl.confirm_and_pay_button() ##点击确认并支付 hp.Moveable_float_close() # 如果出现浮层弹框,关闭 sos.check_order_details() #点击查看订单详情 od.continue_buy() #点击继续投注该彩种 efcn.hand_options(3) # 任选3个号 efcn.confirm_number_button() # 点击确认选号 text1 = efcl.lottery_chase_throw_text() self.assertIn("3注1期1倍", text1) num1 = efcl.Ele_five_select_number() # 获取投注确认页的选号 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("商品名称:乐优炫彩-粤11选5", trade_name) sos.check_order_details() #点击查看订单详情 num2 = od.Ele_five_betting_nu() # 获取订单详情页的号码 self.assertEqual(num1, num2)