Solved

Java Navigation of HTML/Javascript

Posted on 1998-05-04
3
231 Views
Last Modified: 2010-04-16
I want to write a Java application that collects information on  the client and then logs onto a web page and navigates it.
For example; automatically entering USERNAME then PASSWORD then selecting a link then entering more info etc...

The web page I want to navigate is based around Javascript forms, if it is possible:-

1) how do I enter information
2) how do I select links

I alredy know how to get the net connection and Http connections

Thanks in advance
DAve
0
Comment
Question by:davebarter
3 Comments
 
LVL 6

Expert Comment

by:gadio
Comment Utility
 You can use the following workflow:
1. Enter the information using the normal awt components such as TextArea and TextField. Place them in card layouts. This setting would be the applet and you will place it in a top frame.
2. This applet will invoke html pages in another frame (say, the bottom frame) according to the data entered in the applet.

Would that do for your program? Or do you want to navigate an existing site according to the data that was submitted in that site's formes?
If you want more details / samples, feel free to ask.

Regards, G.
0
 

Author Comment

by:davebarter
Comment Utility
Thanks for the reply
I want to navigate an existing site
Dave
0
 
LVL 1

Accepted Solution

by:
dreamPeace earned 100 total points
Comment Utility
Q still on?

  OK, collect the data, as said, by a TextField for example, then u have three ways of sending it:
  1. CGI - create a CGI and encode the recieved data in to a URL
   (www.x.org/cgi-bin/enter?Pass=xyz&user=me) for example, then use java to request
   this document by HTTP and then u'l get what the CGI asnwered (correct? No?)
  2. Open a custom socket to the server, on which u must run a daemon of your own,
   which will process the login data and reply and all in you'r own format. This will also
   allow encryption
  3. Use standard HTTP authentication, will allow encryption, similar to CGI only this
   is better as it prevents browsing the site unless u correctly logged in.
 
  * U can also use HTTP or CGI authentification BEFORE the Java even loads.

   Now, to ask a frame to navige, u need to call the following command:
 
getAppletContext().showDocument(new URL(getCodeBase(),"whatever.html"), "framename");

  If u need MORE info don't reject the answer just leave a comment and I'l respond.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now