Beispiel #1
0
    #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)
    screen.paste("John")
    screen.type(Key.TAB)
    screen.paste("Smith")
    screen.type(Key.TAB)
    screen.paste(user)
    screen.type(Key.TAB)
    screen.paste(pwd)
    screen.type(Key.TAB)
    screen.type(Key.SPACE)
    screen.click(dbRegistrationBtn)
    start_browser("http://www.dropbox.com")
Beispiel #2
0
 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)
 screen.type(Key.TAB)
 screen.paste(pwd)
 screen.type(Key.TAB)
 for i in range(random.randint(1, 27)):  #date
     screen.type(Key.DOWN)
 screen.type(Key.TAB)
 for i in range(random.randint(1, 12)):
     screen.type(Key.DOWN)
 screen.type(Key.TAB)
    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)
    screen.type(Key.TAB)
    screen.paste(pwd)
    screen.type(Key.TAB)
    for i in range(random.randint(1,27)): #date
        screen.type(Key.DOWN)
    screen.type(Key.TAB)
    for i in range(random.randint(1,12)):
        screen.type(Key.DOWN)
    screen.type(Key.TAB)
    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)
    screen.paste("John")
    screen.type(Key.TAB)
    screen.paste("Smith")
    screen.type(Key.TAB)
    screen.paste(user)
    screen.type(Key.TAB)
    screen.paste(pwd)
    screen.type(Key.TAB)
    screen.type(Key.SPACE)
    screen.click(dbRegistrationBtn)
    start_browser("http://www.dropbox.com")
Beispiel #5
0
from sikuli.Sikuli import Screen, KEY_CTRL, Key
scr = Screen()
scr.type(psc, "a", KEY_CTRL)
scr.type(Key.BACKSPACE)
scr.paste(psc, content)