Hello,
To solve this issue you need to catch the moment when page redirects to a Google page. The following solution shows how you can do this:
WebBrowser browser = new HeadlessBrowser();
browser.navigate("file://" + "F:/a.html");
browser.waitReady();
browser.addNavigationListener(new NavigationEventAdapter()
{
public void entireDocumentCompleted(WebBrowser webBrowser, String url)
{
String content = webBrowser.getContent();
System.out.println(content);
}
});
Regards,
Vladimir Ikryanov