Beispiel #1
0
def loadImages(path):
    
    current_files = os.listdir(path)
    
    for file_name in current_files:
        full_file_name = os.path.join(path, file_name)
        
        if os.path.isdir(full_file_name):
            addImagePath(full_file_name)
            loadImages(full_file_name)
Beispiel #2
0
def start_browser(url):
    try:
        subprocess.Popen(['xdg-open', url])
    except OSError:
        print 'Opening the browser failed'


if __name__ == '__main__':
    #read username and password from stdin
    time.sleep(1)  #wait
    user = sys.stdin.readline()
    pwd = sys.stdin.readline()
    #Add path to where images shall be searched at
    ABS_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    addImagePath(ABS_PATH + "/images/dropbox")
    # Start browser
    start_browser("http://www.dropbox.com")
    screen = Screen()
    successful = configure_language()
    if not successful:
        popup(
            "Automatic registration at Dropbox failed for one of the following reasons.\n"
            +
            "Otherwise you can report an issue at https://github.com/joe42/CloudFusion/issues.\n"
            + "1. Firefox is not installed\n" +
            "2. You were already logged in to Dropbox\n" +
            "3. Your browser language settings are neither German nor English\n"
            + "4. Your browser is open in a different workspace\n", "Error")
    screen.click(dbRegistrationBtn)
    if screen.exists(firstNameInput, 2):
Beispiel #3
0
    try:
        subprocess.Popen(['xdg-open', url])
    except OSError:
        print 'Opening the browser failed'


if __name__ == '__main__':
    #read username and password from stdin
    time.sleep(1)  #wait

    user = sys.stdin.readline()
    pwd = sys.stdin.readline()
    #Add path to where images shall be searched at
    CLOUDFUSION_PATH = os.path.dirname(
        os.path.dirname(os.path.abspath(__file__)))
    addImagePath(CLOUDFUSION_PATH + "/images/tonline")
    screen = Screen()
    # Start browser
    start_browser(
        "https://meinkonto.telekom-dienste.de/konto/registrierung/email/index.xhtml"
    )
    if screen.exists(salutationDropDown, 5):
        screen.click(salutationDropDown)
    if screen.exists(salutationDropDownM, 2):
        screen.click(salutationDropDownM)
    screen.type(Key.TAB)
    screen.paste("John")
    screen.type(Key.TAB)
    screen.paste("Smith")
    screen.type(Key.TAB)
    screen.paste(user)
Canvas.setDefaultDrawingStrategy(SegmentDrawingStrategy)

Launcher.setLogger(EntityLoggerProxy)


## Boot

logger = EntityLoggerProxy()
logger.info("[SikuliFramework] Booting.. SikuliVersion=%s" % Env.getSikuliVersion())

# Works on all platforms
slash = "\\" if Env.getOS() == OS.WINDOWS else "/"

# Add image libraries (searched in order)
addImagePath(Config.imageBaseline + slash + "os" + slash + str(Env.getOS()).lower() + slash + str(Env.getOSVersion(True)).lower() + slash + Config.language )
addImagePath(Config.imageBaseline + slash + "os" + slash + str(Env.getOS()).lower() + slash + str(Env.getOSVersion(True)).lower())

addImagePath(Config.imageBaseline + slash + "os" + slash + str(Env.getOS()).lower() + slash + Config.language )
addImagePath(Config.imageBaseline + slash + "os" + slash + str(Env.getOS()).lower())

addImagePath(Config.imageBaseline + slash + Config.language )
addImagePath(Config.imageBaseline)

logger.trace("Image search path: %s" % getImagePath())

# Sikuli shows a visual effect (a blinking double lined red circle) on the spot where the action
if Config.debugPlaybackMode: 
    setShowActions(True)

setAutoWaitTimeout(Config.waitTime)
    return False

def start_browser(url):
    try:
        subprocess.Popen(['xdg-open', url])
    except OSError:
        print 'Opening the browser failed'

if __name__ == '__main__':
    #read username and password from stdin
    time.sleep(1) #wait 
    user = sys.stdin.readline()
    pwd = sys.stdin.readline()
    #Add path to where images shall be searched at
    ABS_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    addImagePath(ABS_PATH+"/images/dropbox")
    # Start browser
    start_browser("http://www.dropbox.com")
    screen = Screen()
    successful = configure_language()
    if not successful:
        popup("Automatic registration at Dropbox failed for one of the following reasons.\n"+
              "Otherwise you can report an issue at https://github.com/joe42/CloudFusion/issues.\n"+
              "1. Firefox is not installed\n"+
              "2. You were already logged in to Dropbox\n"+
              "3. Your browser language settings are neither German nor English\n"+
              "4. Your browser is open in a different workspace\n", 
              "Error")
    screen.click(dbRegistrationBtn)
    if screen.exists(firstNameInput,2):
        screen.click(firstNameInput)
def start_browser(url):
    try:
        subprocess.Popen(['xdg-open', url])
    except OSError:
        print 'Opening the browser failed'

if __name__ == '__main__':
    #read username and password from stdin
    time.sleep(1) #wait     

    user = sys.stdin.readline()
    pwd = sys.stdin.readline()
    #Add path to where images shall be searched at
    CLOUDFUSION_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    addImagePath(CLOUDFUSION_PATH+"/images/tonline")
    screen = Screen()
    # Start browser
    start_browser("https://meinkonto.telekom-dienste.de/konto/registrierung/email/index.xhtml")
    if screen.exists(salutationDropDown,5):
        screen.click(salutationDropDown)
    if screen.exists(salutationDropDownM,2):
        screen.click(salutationDropDownM)
    screen.type(Key.TAB)
    screen.paste("John")
    screen.type(Key.TAB)
    screen.paste("Smith")
    screen.type(Key.TAB)
    screen.paste(user)
    screen.type(Key.TAB)
    screen.paste(pwd)
Beispiel #7
0
Canvas.setDefaultDrawingStrategy(SegmentDrawingStrategy)

Launcher.setLogger(EntityLoggerProxy)

## Boot

logger = EntityLoggerProxy()
logger.info("[SikuliFramework] Booting.. SikuliVersion=%s" %
            Env.getSikuliVersion())

# Works on all platforms
slash = "\\" if Env.getOS() == OS.WINDOWS else "/"

# Add image libraries (searched in order)
addImagePath(Config.imageBaseline + slash + "os" + slash +
             str(Env.getOS()).lower() + slash +
             str(Env.getOSVersion(True)).lower() + slash + Config.language)
addImagePath(Config.imageBaseline + slash + "os" + slash +
             str(Env.getOS()).lower() + slash +
             str(Env.getOSVersion(True)).lower())

addImagePath(Config.imageBaseline + slash + "os" + slash +
             str(Env.getOS()).lower() + slash + Config.language)
addImagePath(Config.imageBaseline + slash + "os" + slash +
             str(Env.getOS()).lower())

addImagePath(Config.imageBaseline + slash + Config.language)
addImagePath(Config.imageBaseline)

logger.trace("Image search path: %s" % getImagePath())