Jump to content
Sign in to follow this  
matthewh

Java UDF

Recommended Posts

matthewh

Followed the setup in the posting:

http://www.autoitscript.com/forum/index.php?showtopic=87956

My simple script is the following:

---------------------------------------------------------------

#include <Java.au3>

$result = _JavaAttachAndWait("Upload Images Into Document")

$result = _JavaObjSelect("", "File name:", "text")

$result = _JavaObjValueSet("", "File name:", "text", "01.tif")

$result = _JavaObjSelect("", "Open", "push button")

---------------------------------------------------------------

I am attaching to a java applet running inside a web page.

If I open the file dialog in the applet manually and then run the above script, the script works.

If I automate the opening of the dialog through Selenium RC (basically just having Selenium commands click the html button element that invokes the applet to show the dialog), then it doesn't work.

I know I might be criticized for posting the question on this group, but I think the problem might be in how the "AutoITJavaAccess.dll" is attaching to the process under the Selenium environment.

Thoughts? (Any ideas, leads, solutions ;-), etc. would be great)

Matthew

Share this post


Link to post
Share on other sites
Aditya

Selenium RC is a proxy for the Selenium core, which does the actual work. That is why you will see two browser windows opened when you use Selenium RC. So are you sure you are attaching to the right window?

Share this post


Link to post
Share on other sites
matthewh

Good point. I see the two browsers, but the title of the dialog window is "Uploads Images Into Document". There are no other windows with that name (at least that I can see). There shouldn't be any ambiguity conflict.

I appreciate your reply.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.