How to configure Automator to log into a website, each time generating a new random UID and email address? I need to find a way to log into a company intranet site multiple times in quick succession on OS X 10.8.2, each time with a new completely random user ID and email address. The website only requires the UID field to be filled out with unique text and to have the email address field populated with anything as long as it ends with .com (i.e. UN: jegfwkgfb email: kfgwkgb@wkefhwk.com PW: password). NB The password field can be filled out with the same password each time.

It needs to be a little script that I can run manually whenever needed as I need to log in multiple times quickly.

So in summary it needs to:


Visit the site
Populate UN, PW and email fields (with a different, random UN &amp; email each time)
Hit enter to complete the login


I was hoping this could be accomplished in Automator and / or Applescript?

Thanks in advance guys
Try running a script like this in AppleScript Editor:

do shell script "jot -r -c 24 a z | rs -g 0 8"
tell result to set {user, mail} to {paragraph 1, paragraph 2 &amp; "@" &amp; paragraph 3 &amp; ".com"}

open location "https://accounts.google.com/ServiceLogin"
delay 1
tell application "Safari" to tell document 1
    do JavaScript "document.getElementById('Email').value = '" &amp; mail &amp; "'
    document.getElementById('Passwd').value = 'password'
    document.querySelectorAll('#gaia_loginform input[type=submit]')[0].click()"
end tell


For Chrome, replace document 1 with active tab of window 1 and do JavaScript with execute javascript.