def test_UnionLotto_unitary_del_X(self): """左边X按钮,能够删除所选号码""" ha = HomePage_lelun(self.driver) hb = UnionLottoChooseNumber_lelun(self.driver) hc = ConfirmLottery_lelun(self.driver) hc1 = PaintBallChooseNumber_lelun(self.driver) hd = PaintBallConfirm_lelun(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.Del_x() ##点击左侧X按钮 mur1 = hc1.Play_fb() self.assertEqual('玩\n法', mur1)
def test_one_lottery_ckick_x_case(self): '''在投注确认页面,单注号码,点击左边X按钮,页面能跳转到选号页''' ###点击进入大乐透进入大乐透选号页面### hp = HomePage_lelun(self.driver) hd = ArrangeFiveConfirmLottery_lelun(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() l = Login_lelun(self.driver) hp.My_lottery_ticket() # 点击我的彩票 l.login_lelun() # 点击登录 sos = SubmitOrderSuccess_lelun(self.driver) hp.homepage_link() # 点击首页 hp.Moveable_float_close() hp.Lottery_link() # 点击大乐透链接 blcn = BigLotteryChooseNum_lelun(self.driver) blcl = BigLotteryConfirmLottery_lelun(self.driver) cl = ConfirmLottery_lelun(self.driver) od = OrderDetails_lelun(self.driver) ulcn = UnionLottoChooseNumber_lelun(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_UnionLotto_unitary_many_note_del_X(self): """左边X按钮,能够删除所选号码""" ha = HomePage_lelun(self.driver) hb = UnionLottoChooseNumber_lelun(self.driver) hc = ConfirmLottery_lelun(self.driver) hd = PaintBallConfirm_lelun(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()