Jump to content

Recommended Posts

Posted

Trying to click on a Javascript button and I have tried _IEACtion and _IESubmit with no success ??

<TD align="center" style="HEIGHT: 24px"><input type="submit" name="AscxLoginLogin1:btnLogin" value="Login" onclick="if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); " language="javascript" id="AscxLoginLogin1_btnLogin" style="font-weight:bold;width:69px;" /></TD>

Posted

Trying to click on a Javascript button and I have tried _IEACtion and _IESubmit with no success ??

<TD align="center" style="HEIGHT: 24px"><input type="submit" name="AscxLoginLogin1:btnLogin" value="Login" onclick="if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); " language="javascript" id="AscxLoginLogin1_btnLogin" style="font-weight:bold;width:69px;" /></TD>

Did you successfully get an object reference to it before trying to do anything with it? It has both name and id set, so it shouldn't be hard to get.

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

Did you successfully get an object reference to it before trying to do anything with it? It has both name and id set, so it shouldn't be hard to get.

;)

Which one would I use.. Wright now I can send a user name to it and password but can't click on the damn Login Button..

Posted

$oIE = _IECreate("getsecuritycode.aspx")

$oForm = _IEFormGetObjByName($oIE,"Form1")

$username = _IEFormElementGetObjByName ($oForm, "AscxLoginLogin1:txtUsername")

_IEFormElementSetValue ($username, "user")

$password = _IEFormElementGetObjByName ($oForm, "AscxLoginLogin1:txtPassword")

_IEFormElementSetValue ($password, "password")

Then I need to click on the LOGIN button thats damn Javascript....

Posted

$oIE = _IECreate("getsecuritycode.aspx")

$oForm = _IEFormGetObjByName($oIE,"Form1")

$username = _IEFormElementGetObjByName ($oForm, "AscxLoginLogin1:txtUsername")

_IEFormElementSetValue ($username, "user")

$password = _IEFormElementGetObjByName ($oForm, "AscxLoginLogin1:txtPassword")

_IEFormElementSetValue ($password, "password")

Then I need to click on the LOGIN button thats damn Javascript....

Should be just:
$login = _IEFormElementGetObjByName ($oForm, "AscxLoginLogin1:btnLogin")
_IEAction($login, "click")

If that doesn't trigger the "onclick" javascript event, then use Example 2 from _IEAction() in the help file (give it focus and send "Enter").

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...