Best way to automate Java application in browser
I have written some scrapers and other applications to automate web tasks like form entry using webrequest/response class. But in this case it’s a Java running in IE. I’m not sure if the proper term is applet but it’s not JavaScript and uses the JRE . My research leads me to believe that Java can communicate to its server by HTTP or RPC and in this case I see no HTTP traffic once it’s up and running so I don’t believe I can create a surrogate in the way I’m familiar with. I don’t need user input or visibility. I would like your suggestions as to what would be the best method to automate a web task in this case from VB.NET.
At the moment using the WebBrowser control seems to be the leading candidate. I only played with it once for about an hour but assuming it can run Java within it’s looking pretty good. The next nebulous concept is to automate IE. I’ve never done this before but it appears one can automate IE just like I do Excel or anything else. Maybe there are other possibilities to look into?
One possible complication is that the Java application often is unresponsive for long periods. EG most of the time you click a button and it executes quickly. But in some cases it can take several seconds. I think it always gets to the next page eventually but there’s a variable delay. Using my old third party macro program I quickly found that using IE events that indicate when the page has loaded is useless. IOW the page has loaded for IE but the Java is not ready for input yet.
I would greatly appreciate any input on this matter.