Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Get information from browser

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    10
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Get information from browser

    I'm working on a program that automatically fills forms out on a website for work. It uses the tab key to navigate the page to the different fields. However I do not know how to make it pause for the browser to load the page other than hardcoding some time into it. Is there a way to determine when the browser has finished loading a page in java? For example if the program fills out a page and needs to navigate to the next page, I would like it to wait until the browser is finished loading the next page before continuing to populate fields without having to use some set time. This is important because some page navigations are variable and take up to a few minutes.

    Also if some fields do not fit the specifications of the website then a message will pop up informing the user that the data entered into the fields is invalid. Is there a way to set some sort of listener for if this happens? I would like to make the program pause and wait for user input when this happens. I just do not know how to determing when this occurs.


  2. #2
    Junior Member
    Join Date
    Jun 2012
    Posts
    10
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Get information from browser

    Someone pointed out to me that javascript has the requisite handlers for these functions. However my program is written in Java. Is it possible to execute javascript in a java program as well as receive information from the javascript? Can I run some javascript code in a java program somehow and also get information from the javascript thread, or class or whatever I would have to use, such as if the browser is loading in the java program? So that it could query the Javascript thread/process/class/object and then use the information received from the Javascript, such as wait until the javascript says the browser is no longer loading?

Similar Threads

  1. Getting information from an array
    By andresfelquintero in forum Algorithms & Recursion
    Replies: 2
    Last Post: May 3rd, 2011, 04:53 PM
  2. I cannot get to print out all my information.
    By kl2eativ in forum What's Wrong With My Code?
    Replies: 4
    Last Post: January 25th, 2011, 01:46 PM
  3. taking information from one array into another
    By Stn in forum Object Oriented Programming
    Replies: 1
    Last Post: January 18th, 2011, 11:56 AM
  4. can't get all the information out of my array at once... please help
    By Tate in forum What's Wrong With My Code?
    Replies: 3
    Last Post: November 28th, 2010, 06:22 AM
  5. Getting information from a folder
    By shadihrr in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: February 23rd, 2010, 04:13 PM