Fairly new to this & as a result spent a while reading relevant posts (particularly from JJ) but not having done much dev. work I’m at a loss! It just won’t populate the uname & password fields even with a delay to allow the page to fully load first! I got the form references by looking at the source of the page. Could anyone help please?
There is some tricky javascript in this form, so regular methods won’t work. Use this instead:
set x to "document.getElementsByTagName('input').item('4').value = 'foo';
document.getElementsByTagName('input').item('5').value = 'bar';
document.getElementsByTagName('input').item('6').click();
// if the click() method doesn't work for you (it does in Safari 2.0.1), use the following line instead:
// document.mainform.submit()"
tell application "Safari" to do JavaScript x in document 1