from sikuli.Sikuli import Screen scr = Screen() scr.wait(psc, int(timeout))
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) screen.paste("John") screen.type(Key.TAB)