Help Clicking a Web button.

I access the “Apple Education Store” a lot and thought it would be better to appleScript the log in page.

I’ve managed to work out the Java stuff to input my college name and city but I can’t click the “I accept” button can someone help?

Here’s my code:


set MyWeb to "http://store.apple.com/Apple/WebObjects/ukInd"

set x to "document.forms[0].elements[0].value = 'College Name';
document.forms[0].elements[1].value = 'City Name';
document.forms[0].elements[2].click ();"


tell application "Safari"
	activate
	open location MyWeb
	delay 4
	do JavaScript x in document 1
end tell