Results 1 to 3 of 3
  1. #1
    Arsenic is offline Member
    Join Date
    Mar 2009
    Location
    Atlantis
    Posts
    8
    Rep Power
    0

    Default output "left click"/enter command?

    I'm trying to write a program that will automatically fill out an internet application from a users input and then I want my program to click a submit button at the bottom of the page, but I'm not too sure java might have something like it? I believe PHP has a .CLICK function of some sort, but I was wondering if Java had one. I looked into the URL, and the many HTTP API docs but non contain what I need.

    Thank you for your time, and replies!

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

    Default

    Have a look at the Robot class. But its use to perform actual program logic by means of actions carried out on on screen controls is rather awkward.

    Often a "submit" button has a url associated with its action. It might be better to figure out what that URL is and have your program do the same thing based on the given input (GET the contents of the url or POST data to it.)

  3. #3
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    Default

    Sounds like you want to GET the blank page and then POST back to the server. The contents of your post response will have to match what the page/browser would produce. As long as there is no authentication or other complicated content in the blank page, that should be easy. I suggest GETting the blank page because the server might expect a GET before accepting a POST.

Similar Threads

  1. Java, Military Format using "/" and "%" Operator!!
    By sk8rsam77 in forum New To Java
    Replies: 11
    Last Post: 02-26-2010, 03:03 AM
  2. Replies: 2
    Last Post: 01-24-2009, 06:56 PM
  3. Replies: 6
    Last Post: 12-29-2008, 02:47 PM
  4. Regarding "install" command
    By Kavitha Kamath in forum New To Java
    Replies: 1
    Last Post: 11-21-2008, 05:30 AM
  5. Replies: 1
    Last Post: 10-20-2008, 07:35 AM

Posting Permissions

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