Sign in to follow this  
Followers 0
camus

IE Java Applet Login Automation

5 posts in this topic

Hi,

First this software package rocks my socks, it works f'in great!! I've just begun to read the help files and include files to familiarize myself with it. but i have deadlines!!

Second, I want to automate a login procedure. The login username and password forms are on a java applet window. I load the java applet through IE.

I've included the IE.au3 file and have pretty much worked through functions for handling IE.

I cannot seem to Send data to the Java Applet.

Is there a way to set focus to windows based on class names? Or even send data to windows based on class names?

heres what i have:

Func startOpex()

$oIE = _IECreate($sURL)

$oButton = _IETagNameGetCollection( $oIE, "input", 0 )

_IEAction($oButton, "click" )

return $oIE

endFunc

$myIEobj = startOpex();

WinWaitActive("Trader Workstation")

Send($sUsername1)

send("{TAB}")

Send($sPassword1)

Send("{TAB}")

Send("{Enter}")

after my function.. that stuff below just bombs out and fails.

Share this post


Link to post
Share on other sites



heres some more info:

so I run the script from SciTE, before the Java applet finishes launching the script has already returned error code: 0.

I have replaced WinWaitActive("Trader Workstation")

with with WinWait() and I get both the same result..

Share this post


Link to post
Share on other sites

script has already returned error code: 0.

What does that mean?


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

What does that mean?

That the script is finished.

It finishes before the Java applet launches, that means it is not using the WinWait() commands to continue parsing the script.

I was searching before, could i use ControlSend() to input the username and password variables?

Share this post


Link to post
Share on other sites

That the script is finished.

It finishes before the Java applet launches, that means it is not using the WinWait() commands to continue parsing the script.

I was searching before, could i use ControlSend() to input the username and password variables?

Assuming there is just one java applet on the page and it uses an applet tag (it can also use an "object" tag)you can use this tio give it focus:

$oApplet = _IETagNameGetCollection($oIE, "applet", 0)
_IEAction($oApplet, "focus")

You can then use your Send commands to send keystrokes to it.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0