I am working with java to get some information from a web page. The problem is the information I need is generated by a JavaScript function. How can get this information because the code below brings only page information before full loaded (which means I can get only frames of the page).
code1.
URL target = new URL()
HttpURLConnection con = (HttpURLConnection)target.openConnection();
StringBuffer sb = new StringBuffer();
String line = "";
BufferedReader br = null
try {
br = new BufferedReader(new InputStreamReader(con.getInputStream()));
while((line = br.readLine()) != null){
sb.append(line);
}
} catch(Exception e){
e.printStackTrace();
}
Is there a way to know when the page has fully loaded in java? (Extra library can be an answer, but I wish to do it in java only). Thanks.