def test_Direct_chase_ticket_fifty_case(self): """"点击追加50期""" ha = HomePage_lexiu(self.driver) hb = There_D_choosenumber_lexiu(self.driver) hb1 = ArrangeFiveChooseNumber_lexiu(self.driver) hb2 = UnionLottoChooseNumber_lexiu(self.driver) hc = ConfirmLottery_lexiu(self.driver) hd = ArrangeFiveConfirmLottery_lexiu(self.driver) hl = Login_lexiu(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.fucai_3D_link() ###点击3D hb.Play_d() ###点击玩法 hb.Play_direct_d() ###点击直选 hb.there_D_bais(1, 0) # 随机选取百位去个数字 hb.there_D_shis(0, 1) # 随机选取十位1个数字 hb.there_D_ges(0, 1) # 随机选择个位1个数字 hb1.Confirm_nu() # 点击确认选号 hc.chase_ticket_button() ###点击追期 hc.chase_ticket_button_fifty() ##点击 50期 nu=hd.Test_period_show() self.assertEqual('50',nu) hc.submit_order_to_station_owner_button() # 点击提交给站主 #hl.new_user_login_tab() # 点击新登录 hl.login_lexiu() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付
def test_chase_ticket_fifty_case(self): """"点击追加50期""" ha = HomePage_lexiu(self.driver) hb = Seven_color_choosenumber_lexiu(self.driver) hb2 = ArrangeFiveChooseNumber_lexiu(self.driver) hb1 = UnionLottoChooseNumber_lexiu(self.driver) hc = ConfirmLottery_lexiu(self.driver) hc1 = ArrangeFiveConfirmLottery_lexiu(self.driver) hl = Login_lexiu(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.colorful_star_link() ###点击七星彩 hb.Seven_nuos(3) # 在一位随机点击3个数字 hb.Seven_nuts(1) # 在二位随机点击1个数字 hb.Seven_nuths(2) # 在三位随机点击2个数字 hb.Seven_nufs(3) ##在四位随机点击3个数字 hb.Seven_nufis(1) # 在五位随机点击1个数字 hb.Seven_nuss(3) # 在六位随机点击3个数字 hb.Seven_nuses(2) # 在七位随机点击2个数字 hb2.Confirm_nu() # 点击确认选号按钮 hc.chase_ticket_button() ###点击追期 hc.chase_ticket_button_fifty() ##点击 50期 nu = hc1.Test_period_show() self.assertEqual('50', nu) hc.submit_order_to_station_owner_button() # 点击提交给站主 #hl.new_user_login_tab() # 点击新登录 hl.login_lexiu() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付
def test_UnionLotto_DanTuo_many_case(self): """增加倍数和期数""" ha = HomePage_lexiu(self.driver) hb = UnionLottoChooseNumber_lexiu(self.driver) hc = ConfirmLottery_lexiu(self.driver) hl = Login_lexiu(self.driver) hd = SubmitOrderSuccess_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.throw_times_input(13) hc.chase_ticket_button() # 点击追xx期 hc.chase_ticket_button_twenty() # 点击追20期 mur = hc.lottery_number_text() # 读取注数 self.assertEqual('2', mur) ##断言 nu = hc.throw_time_text() ###倍数 self.assertEqual('13', nu) chase_time_text = hc.chase_time_text() # 获取追号期数 self.assertIn("20", chase_time_text) # 检查追号期数为20期 hc.submit_order_to_station_owner_button()
def test_Lottery_Machine_Choose_ten_case(self): '''大乐透机选10注,追加10期测试''' hp = HomePage_lexiu(self.driver) hp.open() hp.Moveable_float_close() # 关闭悬浮窗口 hp.Lottery_link() # 点击大乐透链接 ulcn = UnionLottoChooseNumber_lexiu(self.driver) ulcn.machine_choose_button() # 点击机选按钮 ulcn.machine_choose_ten_button() # 点击机选5注 cl = ConfirmLottery_lexiu(self.driver) blcl = BigLotteryConfirmLottery_lexiu(self.driver) cl.chase_ticket_button() # 点击追xx期 blcl.additional_radio_button() # 点击追加单选按钮 cl.chase_ticket_button_ten() # 点击追加10期单选按钮 blcl.l_throw_times_button_sub(3) #输入投注倍数,点击“-”按钮 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, "提交订单失败") # 返回首页 sos.return_home()
def test_Direct_chase_ticket_too_case(self): """"点击追加2期""" ha = HomePage_lexiu(self.driver) hb = Arrang_there_choosenumber_lexiu(self.driver) hb1 = UnionLottoChooseNumber_lexiu(self.driver) hb2 = ArrangeFiveChooseNumber_lexiu(self.driver) hc = ConfirmLottery_lexiu(self.driver) hd = ArrangeFiveConfirmLottery_lexiu(self.driver) hl = Login_lexiu(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.rank_three_link() ####点击排列3 hb.Play() ###点击玩法 hb.Play_Direct() ####点击直选 hb.there_bais(1) # 随机选取百位去个数字 hb.there_shis(1) # 随机选取十位1个数字 hb.there_ges(1) # 随机选择个位1个数字 hb2.Confirm_nu() # 点击确认选号 hc.chase_ticket_button() ###点击追期 hc.chase_ticket_button_two() ##点击 2期 nu = hd.Test_period_show() self.assertEqual('2', nu) hc.submit_order_to_station_owner_button() # 点击提交给站主 #hl.new_user_login_tab() # 点击新登录 hl.login_lexiu() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付
def test_Lottery_Dantuo_1_5_1_2_chase_throws_case(self): '''胆拖投注,在投注确认页面增加倍数和期数,提交订单''' ###点击进入大乐透选号页面### hp = HomePage_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.Lottery_link() # 点击大乐透链接 blcn = BigLotteryChooseNum_lexiu(self.driver) ulcn = UnionLottoChooseNumber_lexiu(self.driver) blcl = BigLotteryConfirmLottery_lexiu(self.driver) cl =ConfirmLottery_lexiu(self.driver) ulcn.DanTuo_mode() # 选择胆拖模式 blcn.l_red_one_five() # 红球选取1个胆码5个拖码 blcn.l_bule_one_two() # 后区选择1个胆码2个拖码 ulcn.Confirm_button() # 点击确认选号 cl.chase_ticket_button()#点击追xx期 blcl.additional_radio_button() # 点击追加单选按钮 cl.chase_ticket_button_two() # 点击追加2期单选按钮 cl.throw_times_input(2) # 输入投注倍数 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_chase_fifty_case(self): '''追50期流程测试''' 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.chase_ticket_button() # 点击追xx期 cl.chase_ticket_button_fifty() # 点击追50期 lottery_number_text = cl.lottery_number_text() # 获取投注注数文本 self.assertIn("1", lottery_number_text) # 检查投注注数为1注 chase_time_text = cl.chase_time_text() # 获取追号期数 self.assertIn("50", chase_time_text) # 检查追号期数为50期 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.chase_order_details_check() # 检查订单详情页
def test_chase_ticket_fifty_case(self): """"点击追加50期""" ha = HomePage_lexiu(self.driver) hb = ArrangeFiveChooseNumber_lexiu(self.driver) hb1 = UnionLottoChooseNumber_lexiu(self.driver) hd = ArrangeFiveConfirmLottery_lexiu(self.driver) hc = ConfirmLottery_lexiu(self.driver) hc1 = ArrangeFiveConfirmLottery_lexiu(self.driver) hl = Login_lexiu(self.driver) ha.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 ha.Moveable_float_close() ha.rank_five_link() ###点击排列5 hb.Afive_nuws(1) # 随机选择1个万位号码 hb.Afive_nuqs(1) # 随机选择1个千位号码 hb.Afive_nubs(1) # 随机选择1个百位号码 hb.Afive_down() # 鼠标向下 hb.Afive_nuss(1) # 随机选择1个十位号码 hb.Afive_nugs(1) # 随机选择1个个位号码 hb.Confirm_nu() # 点击确认选号按钮 hc.chase_ticket_button()###点击追期 hc.chase_ticket_button_fifty()##点击 50期 nu=hc1.Test_period_show() self.assertEqual('50',nu) hc.submit_order_to_station_owner_button() # 点击提交给站主 #hl.new_user_login_tab() # 点击新登录 hl.login_lexiu() # 输入账号,密码 hc.submit_order_to_station_owner_button() # 点击提交给站主 hc.confirm_and_pay_button() # 点击确认支付
def test_Lottery_Hand_choose_18_2_case( self): ###################mj20171207 """手选一注(复式),多注多倍,提交订单""" ###点击进入大乐透进入大乐透选号页面### hp = HomePage_lexiu(self.driver) hp.open() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() hp.Lottery_link() # 点击大乐透链接 blcn = BigLotteryChooseNum_lexiu(self.driver) blcl = BigLotteryConfirmLottery_lexiu(self.driver) blcn.l_red_label18() # 任意选择5个红球 blcn.l_bule_label2() # 任意选择2个蓝球 ulcn = UnionLottoChooseNumber_lexiu(self.driver) ulcn.Confirm_button() # 点击确认选号按钮 cl = ConfirmLottery_lexiu(self.driver) 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("856823", num1 + chase + times) 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, "提交订单失败") ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() # 返回首页 sos.return_home() hp.Moveable_float_close() # 点击我的彩票,进入我的个人中心页面 hp.MyTicket_link() ######判断是否出现浮层弹框,如果出现浮层点击X,然后执行下一步操作 hp.Moveable_float_close() # 点击个人中心页面右上角的设置,进入设置页面 mt = MyTicket_lexiu(self.driver) mt.setup_link() # 点击设置按钮 # 点击设置页面的“退出账户”按钮 su = SetUp_lexiu(self.driver) su.LogOut_button()