You can use the following approach to get HtmlPage object from webclient assuming you already navigaed to a page either by using wc.getPage(url) or submitting a form in previous page or using any other method. Assuming that wc
is the WebClient object.
HtmlPage currentPage = (HtmlPage) wc.getCurrentWindow().getEnclosedPage();