def test_3_buy_scholars(self): driver = self.driver driver.get(self.base_url) ml = DamagePageSection(driver) evo = EvoPointPageSection(driver) header = StatsPage(driver) club = ClubberPageSection(driver) owned = evo.get_scholar_owned() cost = evo.get_scholar_cost() try: header.import_save() except IOError: pass evo.waiting() points = evo.get_evo_points() print "Number of available points: " + str(points) start = time.time() r_present = False while owned < 10 or r_present is False: ml.click_egg() if (time.time() - start) > 30: points = evo.get_evo_points() print "Updated number of points: " + str(points) while points > cost: evo.buy_scholar() points -= cost cost = evo.get_scholar_cost() owned += 1 start = time.time() if points > 600 and r_present is False: evo.purchase_upgrades("02", "a") club.check_ranged_present() r_present = True header.export_save()