Results 1 to 6 of 6
  1. #1
    Cory is offline Member
    Join Date
    Jul 2012
    Posts
    3
    Rep Power
    0

    Default How to automate data entry into a Java applet

    I have a client who needs data pushed from one system to another but the only way to access the destination is via a Java applet running in a web window hosted internally. The source data is provided as a CSV. I have created many macros with Macro Express Pro to automate these batches but itís method is to blindly fire mouse clicks and type in a way to emulate a user. Due to timing issues and environmental variations itís very difficult to write code that will work reliably in large batches or aren't excruciatingly slow.
    I write a bit in VB.NET and for other clients have automated things like this using HTTP request/response, browser controls, or other automation APIs to do similar things and would really like to do the same for this client but so far the appletís controls appear invisible to the browser and there is no HTTP traffic so Iím guessing itís using RPC.
    My first question is if an applet can be run outside the web browser somehow. If it can be I might be able to set up a more stable environment. Also it might expose the controls as Windows controls that would be visible to Macro Express.
    Next question is if thereís any way I could write a program in VB or other language that could automate the form entry. Is there a generic API or would the developer of the applet have to have created an API?
    Third question is if there is any simple and inexpensive testing software that might work for this. I know for other things there are load testing applications that run large batches of data matrix profiles for testing. Perhaps something like this could be used to automate? So far all Iíve found so far like AutoIT or MEP are blind and can only fire keyboard and mouse events at it.
    Finally if anyone has any other suggestions of how I could automate this data entry more programmatically Iím all ears!

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: How to automate data entry into a Java applet

    Quote Originally Posted by Cory View Post
    I have a client who needs data pushed from one system to another but the only way to access the destination is via a Java applet running in a web window hosted internally...
    Finally if anyone has any other suggestions of how I could automate this data entry more programmatically I’m all ears!
    I see a bit of a contradiction here.

    Programmatically the task would be accomplished by the application that wants the data exposing some interface for receiving that data in bulk: like a command to process a csv file (or its content which it reads from a file or url). But you say the only way the application gets its data is from this Java applet... Writing an application to do key presses and mouse clicks etc is a bit like building yourself a robot arm to control the keyboard. My point is not to mock your endeavour, but to point out that the application that wants the data needs to be fixed: there is a desire to have it process bulk data which it is unable to satisfy.

    That said the Java applet will be doing *something* to communicate with the application that processes the data. Eg, posting that data or something. You could write an application that takes the csv file and does the same thing multiple times. (eg makes lots of POSTs one after the other). You will have to know exactly what the applet is doing, of course. That's a given. In effect you will be fixing the applet to provide the desired functionality.

    [Edit] The point is that something needs to be fixed. It's like you have a calculator app but someone has forgotten to include a square root key. You could "automate" the process of calculating the square root as a long series by simulating all the gui interactions, or you could fix the calculator.
    Last edited by pbrockway2; 07-17-2012 at 03:17 AM.

  3. #3
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: How to automate data entry into a Java applet

    Reading more closely I see that you've checked for http traffic, but my point remains.

    Also it appears like both the applet and what it communicates with are black boxes from your point of view. You could check all the network traffic to see what exactly is going on (rpc or whatever). But at the end of the day what you are aiming at seems a sort of antiautomation by a client application to take the place of fixing the applet or what it communicates with to provide genuine automation of bulk data processing.

  4. #4
    Cory is offline Member
    Join Date
    Jul 2012
    Posts
    3
    Rep Power
    0

    Default Re: How to automate data entry into a Java applet

    Too funny, I was just talking to a kiwi about the possibility of doing a motorcycle tour of your fine islands.

    You wrote: "Writing an application to do key presses and mouse clicks etc is a bit like building yourself a robot arm to control the keyboard." LOL! That's a very apropos analogy and I didn't take that as mocking. In fact this is exactly how I feel about it and why I am trying to find a better option. But I cannot replace the applet.

    The system this applet is interacting with is a multi-million dollar medical monster which is having troubles staying current with technology due to its massivity. This Java applet is an attempt at a front end to an antiquated text terminal. But it’s all proprietary so we can’t get to that old terminal interface. And we can’t replace it. They have offered to create an interface to import this billing data but the consultation fee to make a quote alone is tens of thousands of dollars. So it’s needs to be a robot arm of sorts as the only portal they are granting me is this GUI applet. At this point I’m just trying to come up with something a little more efficient. Like instead of a robot arm maybe a macro enabled keyboard to extend your analogy.

    In a forum on the Oracle sight someone suggest Java Web Start. All Java running as applets hides everything in the one control which is the display area of the web browser. This goes for all things like ActiveX and so forth. Maybe using the Web Start will expose the controls in the app. If so MEP would be able to interact with them directly. For instance one can set a field’s value directly as opposed to clicking on it and typing. This wouldn’t solve all the problems but it would help with some. For instance one problem is that the fields are scaled in the web window so as the web browser’s size changes so too does the location and size of the controls which blows up if it moves far enough so that a mouse click is now outside the field or worse yet in an adjacent field.

    Thanks for taking the time to consider my post. If you or anyone has any other ideas I’d love to hear them.

  5. #5
    cselic is offline Senior Member
    Join Date
    Apr 2010
    Location
    Belgrade, Serbia
    Posts
    278
    Rep Power
    5

    Default Re: How to automate data entry into a Java applet

    Quote Originally Posted by Cory View Post
    In a forum on the Oracle sight someone suggest Java Web Start. All Java running as applets hides everything in the one control which is the display area of the web browser.
    Please, give us link of that forum discussion.

  6. #6
    Cory is offline Member
    Join Date
    Jul 2012
    Posts
    3
    Rep Power
    0

Similar Threads

  1. start again after no data entry
    By aconti in forum New To Java
    Replies: 11
    Last Post: 06-16-2011, 10:18 AM
  2. Data Entry Workers Needed Worldwide
    By rajshree in forum Jobs Offered
    Replies: 0
    Last Post: 01-30-2011, 07:10 AM
  3. Save data entry
    By tiger100plus in forum NetBeans
    Replies: 2
    Last Post: 12-08-2009, 03:53 PM
  4. Global Data Entry. Earn $2,000 a day use rebate lower price save money $$$
    By arturmoniswork in forum Reviews / Advertising
    Replies: 0
    Last Post: 12-27-2008, 02:35 AM
  5. How Can I Automate Java Installations for PC Apps?
    By salaciak@lgca.org in forum New To Java
    Replies: 0
    Last Post: 07-23-2007, 06:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •