示例#1
0
 def __init__(self):
     self.argStore = {}
     self.logger = EntityLoggerProxy(self)
示例#2
0
from launcher import Launcher

"""
Simple example that validates that the calculator is present on the screen.
This example does not use the Launcher() class so it assumes that the application
is already running.  Results can be found in the /results directory. 
"""

# Change logging level verbosity
#EntityLoggerProxy.getLogger().setLevel(TRACE)
Config.setScreenshotLoggingLevel(TRACE)


# Launch the Calculator binary
textedit = Launcher.run('TextEdit')
logger = EntityLoggerProxy(textedit)

# Type some text in the text area
textedit[TextEdit.TEXT_AREA].type("This is a demo of SikuliFramework")

# Resize the application size 4 times
for i in range(0,4):
    
    # Get the current application region
    region = textedit.validate().region
    
    # Alternate between growing / shrinking application width
    offset = 100 * (1 - ((i % 2)*2))
    
    # Modify the size of current application region
    morph = RegionMorph(0, 0, offset, 0)