Example #1
0
 def test_dantuo_optiops2_intelligent_chase_case(self):  ###mj20171211
     '''胆拖投注,进入智能追号页面,默认追期,提交订单'''
     hp = HomePage_lelun(self.driver)
     hp.open()
     ulcn = UnionLottoChooseNumber_lelun(self.driver)
     ssc_cl = CQSSCConfirmLottery_lelun(self.driver)
     uncl = ConfirmLottery_lelun(self.driver)
     efcl = EleChooseFiveConfirmLottery_lelun(self.driver)
     sos = SubmitOrderSuccess_lelun(self.driver)
     od = OrderDetails_lelun(self.driver)
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     hp.Moveable_float_close()
     hp.My_lottery_ticket()  #点击我的彩票
     l = Login_lelun(self.driver)
     l.login_lelun()  # 点击登录
     hp.Home_page()  #点击首页
     hp.Moveable_float_close()
     hp.gx_11_5_link()  # 点击广西11选5链接
     efcn = ElevenFiveChooseNumber_lelun(self.driver)
     efcn.countdown_text()  # 检查“距离第xxx期截止:”文案是否存在
     efcn.spread_mode_button()  ##选择展开玩法
     efcn.mode_choose(24, 16)  # 选择广西11选5胆拖模式任选二玩法
     efcn.dantuo_choose_num(1, 2)  # 选取1个胆码2个拖码
     total = efcn.total_buy_text()  # 获取注数文本
     self.assertIn("2", total)  # 检查2注
     efcn.confirm_number_button()  # 点击确认选号
     ssc_cl.intelligently_chase_button()  #点击智能选号
     ssc_cl.submit_button()  #点击智能追号的提交按钮
     uncl.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)
 def test_UnionLotto_many_pause(self):
     """多期机选"""
     ha = HomePage_lelun(self.driver)
     hb = UnionLottoChooseNumber_lelun(self.driver)
     hc = ConfirmLottery_lelun(self.driver)
     hl = Login_lelun(self.driver)
     hd = SubmitOrderSuccess_lelun(self.driver)
     he = OrderDetails_lelun(self.driver)
     ha.open()
     ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作
     ha.Moveable_float_close()
     ha.My_lottery_ticket()  ##点击我的彩票
     hl.login_lelun()  ##登录
     ha.Home_page()  ##点击首页
     ha.UnionLotto_link()  # 点击双色球链接
     hb.There_clock()  ##点击右上角。。。
     hb.Many_pause()  #点击多期机选
     hb.Many_pause_nu()  ##点击期号
     hb.Many_pause_confirm()  ##点击提交
     hc.confirm_and_pay_button()  # 点击确认支付