def setUp(self): # Setup mock objects Tool.setAssetName("md5.png") Formatter.setTool(Tool) Formatter.setConfig(Config) Formatter.setDefaultLevel(INFO) Entity.setRegionFinderStrategy(Finder) Entity.setLogger(Logger) Finder.setTest(self)
Entity.setConfig(Config) ClickableEntity.setDefaultClickStrategy(StandardClick()) ClickStrategy.setLogger(EntityLoggerProxy) ClickStrategy.setScreen(Config.screen) Transform.setLogger(EntityLoggerProxy) RegionScreen.setConfig(Config) Finder.setLogger(EntityLoggerProxy) Finder.setConfig(Config) Finder.setTransform(Transform) MultiResultProxy.setEntitySearcher(Searcher) Formatter.setTool(Tool) Formatter.setConfig(Config) EntityTransform.setConfig(Config) Canvas.setDefaultDrawingStrategy(SegmentDrawingStrategy) Launcher.setLogger(EntityLoggerProxy) ## Boot logger = EntityLoggerProxy() logger.info("[SikuliFramework] Booting.. SikuliVersion=%s" % Env.getSikuliVersion()) # Works on all platforms
from log.robotFramework import Logger as RobotLogger from log import * from entity import Entity from region.tests.mockFinder import Finder from log.formatter import Formatter from config import Config from entity.searcher import Searcher from tests.mockTool import Tool import unittest from entity.multiResultProxy import MultiResultProxy Logger.setRobotLogger(RobotLogger()) Logger.setFormatter(Formatter) Formatter.setTool(Tool) Formatter.setConfig(Config) Entity.setLogger(Logger) Entity.setRegionFinderStrategy(Finder) Entity.setSearcherStrategy(Searcher) Entity.setMultiResultProxyStrategy(MultiResultProxy) MultiResultProxy.setEntitySearcher(Searcher)