def test_unionlotto_dantuo_continue_case(self): """胆拖选号页面,选择1注号码,在投注确认页面,继续选1注""" ha = HomePage_lexiu(self.driver) hl = Login_lexiu(self.driver) hb = UnionLottoChooseNumber_lexiu(self.driver) hc = ConfirmLottery_lexiu(self.driver) hd = PaymetMode_lexiu(self.driver) he = BaofooPayment_lexiu(self.driver) hf = ChooseBank_lexiu(self.driver) hf1 = ConfirmPay_lexiu(self.driver) hf2 = LessPaySucess_lexiu(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.UnionLotto_link() # 点击双色球链接 hb.DanTuo_mode() # 选择胆拖模式 hb.u_red_five_two() # 红球选取5个胆码2个拖码 hb.u_bule_one() # 选取一个蓝球 hb.Confirm_button() # 确认选号 hc.continue_choose_num_button() ##继续选号 hb.u_red_five_two() # 红球选取5个胆码2个拖码 hb.u_bule_one() # 选取一个蓝球 hb.Confirm_button() # 确认选号 hc.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 hl.login_nomoney_lexiu() # 点击登录 hc.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 hc.confirm_and_pay_button() # 点击“确认并支付”按钮 mur = hd.Top_up() ##获取充值成功文本 self.assertEqual('充值', mur)
def test_Lottery_Machine_continue_choose_double_button_case(self): '''提交订单页继续选票,复式选号流程测试''' hp = HomePage_lexiu(self.driver) hp.open() hp.Moveable_float_close() # 关闭悬浮窗口 hp.Lottery_link() # 点击大乐透链接 ulcn = UnionLottoChooseNumber_lexiu(self.driver) blcn = BigLotteryChooseNum_lexiu(self.driver) ulcn.machine_choose_button() # 点击机选按钮 ulcn.machine_choose_one_button() # 点击机选一注 ulcn.Confirm_button() # 点击确认选号按钮 cl = ConfirmLottery_lexiu(self.driver) cl.continue_choose_num_button() #点击继续选号 blcn.l_red_label18() # 任意选择18个红球 blcn.l_bule_label2() # 任意选择2个蓝球 ulcn.Confirm_button() #点击确认选号 cl.submit_order_to_station_owner_button() # 点击提交订单给站主 l = Login_lexiu(self.driver) #l.new_user_login_tab() # 切换到新用户登录 l.login_lexiu() cl.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 cl.confirm_and_pay_button() # 点击“确认并支付”按钮 '''断言验证提交订单成功''' sos = SubmitOrderSuccess_lexiu(self.driver) hp.Moveable_float_close() # 关闭悬浮窗口 text = sos.submit_order_success() self.assertEqual("订单提交成功", text, "提交订单失败")
def test_UnionLotto_Machine_continue_choose_button(self): '''机选一注“继续选号”按钮测试''' hp = HomePage_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.UnionLotto_link() # 点击双色球链接 ####选择机选一注并确认选号#### ulcn = UnionLottoChooseNumber_lexiu(self.driver) ulcn.machine_choose_button() # 点击机选 ulcn.machine_choose_one_button() # 机选1注 ulcn.Confirm_button() # 确认选号 cl = ConfirmLottery_lexiu(self.driver) cl.continue_choose_num_button() #点击“继续选号”按钮 ulcn.machine_choose_button() # 点击机选 ulcn.machine_choose_one_button() # 机选1注 ulcn.Confirm_button() # 确认选号 lottery_number_text = cl.lottery_number_text() self.assertIn("2", lottery_number_text) cl.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 #####用户登录###### l = Login_lexiu(self.driver) l.login_lexiu() cl.submit_order_to_station_owner_button() # 点击“提交订单给站主”按钮 cl.confirm_and_pay_button() #确认支付 '''断言验证提交订单成功''' sos = SubmitOrderSuccess_lexiu(self.driver) hp.Moveable_float_close() #关闭弹窗 text = sos.submit_order_success() self.assertEqual("订单提交成功", text, "提交订单失败") trade_text = sos.trade_name_text() # 获取商品名称 self.assertIn("商品名称:乐秀赢球-双色球", trade_text) # 检查商品名称正确 sos.check_order_details() #查看订单详情 od = OrderDetails_lexiu(self.driver) od.order_details_check() #检查订单详情页
def test_UnionLotto_Continue_pick(self): """继续选号添加复式选号""" ha = HomePage_lexiu(self.driver) hb = UnionLottoChooseNumber_lexiu(self.driver) hc = ConfirmLottery_lexiu(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.UnionLotto_link() # 点击双色球链接 hb.u_red_label6() # 任意选择6个红球 hb.u_bule_label1() # 任意选择1个蓝球 hb.Confirm_button() # 点击确认选号按钮 hc.continue_choose_num_button() ##继续选号 hb.u_red_label18() # 任意选择18个红球 hb.u_bule_label1() # 任意选择1个蓝球 hb.Confirm_button() # 点击确认选号按钮 mur = hc.lottery_number_text() # 读取注数 self.assertEqual('18565', mur) nu = hc.throw_time_text() ###倍数 self.assertEqual('1', nu) hc.submit_order_to_station_owner_button() ##点击提交给站主
def test_UnionLotto_assemblage_after(self): """多注(复式、单式组合)选号""" ha = HomePage_lexiu(self.driver) hb = UnionLottoChooseNumber_lexiu(self.driver) hc = ConfirmLottery_lexiu(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.UnionLotto_link() # 点击双色球链接 hb.machine_choose_button() # 点击机选 hb.machine_choose_one_button() # 机选一注 hb.Confirm_button() # 确认选号 hc.continue_choose_num_button() ##继续选号 hb.u_red_label18() # 任意选择18个红球 hb.u_bule_label1() # 任意选择1个蓝球 hb.Confirm_button() # 点击确认选号按钮 mur = hc.lottery_number_text() # 读取注数 self.assertEqual('18565', mur) ##断言 nu = hc.throw_time_text() ###倍数 self.assertEqual('1', nu) hc.submit_order_to_station_owner_button()
def test_UnionLotto_unitary_many_note_del_X(self): """左边X按钮,能够删除所选号码""" ha = HomePage_lexiu(self.driver) hb = UnionLottoChooseNumber_lexiu(self.driver) hc = ConfirmLottery_lexiu(self.driver) hd = PaintBallConfirm_lexiu(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.UnionLotto_link() # 点击双色球链接 hb.u_red_label6() # 任意选择6个红球 hb.u_bule_label1() # 任意选择1个蓝球 hb.Confirm_button() # 点击确认选号按钮 hc.continue_choose_num_button() ##继续选号 hb.u_red_label6() # 任意选择6个红球 hb.u_bule_label1() # 任意选择1个蓝球 hb.Confirm_button() # 点击确认选号按钮 hc.Del_x() ##点击左侧X按钮 mur = hc.lottery_number_text() # 读取注数 self.assertEqual('1', mur) ##断言 nu = hc.throw_time_text() ###倍数 self.assertEqual('1', nu) hc.submit_order_to_station_owner_button()