Exemple #1
0
    def check_teamReport(self):
        self.goto_teamReport()
        data1 = self.get_teamBettingData()
        self.open_url(self.base_url)

        lot1 = Lottery(self.driver)
        lot1.choiceNumer(9)
        lot1.click_aaNumber_btn()
        self.click_ok_btn()
        time.sleep(1)
        betM = lot1.get_betMoney()
        logger.info("投注金额:%s" % betM)
        lot1.click_submit_now_btn()
        time.sleep(0.5)
        self.click_ok_btn()
        lot1.wait_alertToBeVisble()
        time.sleep(2)

        ld1 = LotteryDraw(self.driver)
        ld1.waitToLotteryDraw()
        time.sleep(20)

        self.goto_teamReport()
        data2 = self.get_teamBettingData()
        logger.info("投注前数据: %s 投注后数据: %s" % (data1, data2))
        try:
            assert (Decimal(data2) == Decimal(data1) + Decimal(betM))
        except:
            self.get_screenshot()
            assert (Decimal(data2) == Decimal(data1) + Decimal(betM))
 def lotteryDraw(self):
     lot1 = Lottery(self.driver)
     lot1.choiceAll(9)
     lot1.click_aaNumber_btn()
     lot1.click_submit_now_btn()
     time.sleep(0.5)
     self.click_ok_btn()
     lot1.wait_alertToBeVisble()
     time.sleep(2)
     self.waitToLotteryDraw()
 def orderCancel(self):
     lot1 = Lottery(self.driver)
     lot1.choiceNumer(25)
     lot1.click_aaNumber_btn()
     lot1.click_ok_btn()
     lot1.click_submit_now_btn()
     time.sleep(0.5)
     self.click_ok_btn()
     lot1.wait_alertToBeVisble()
     time.sleep(3)
     self.click_orerCancel_btn()
     time.sleep(1)
     lot1.click_ok_btn()
     self.wait_ocalertToBeVisble()