File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Testing and the fly likes how can I start with HtmlUnit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "how can I start with HtmlUnit" Watch "how can I start with HtmlUnit" New topic
Author

how can I start with HtmlUnit

Julius Gutierrez
Greenhorn

Joined: Apr 04, 2012
Posts: 12
Hi,

I am trying to learn HTML Unit. but as of now, I still don't know where to start. Can someone please suggest where to start and what book needs to read? also what knowledge and skills do I need to learn before learning htmlunit. TIA
Steve Fahlbusch
Bartender

Joined: Sep 18, 2000
Posts: 555
    
    7

might i suggest a google search?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39537
    
  27
No books are needed. The HtmlUnit Web site has explanations and sample code.


Ping & DNS - updated with new look and Ping home screen widget
Julius Gutierrez
Greenhorn

Joined: Apr 04, 2012
Posts: 12
Thank you for the reply. I have seen the htmlunit website and search alot in google but I still don't know where could I begin. Is htmlunit a part of JEE? I'm still new in java and doesn't have much experience in JSE.(I'm currently reading the multithreading in Head First Java ). It would be much appreciated if someone could suggest where could I begin?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39537
    
  27
HtmlUnit does not need or make use of JEE. Have you tried running the sample codes against a Web site of your choosing?
Julius Gutierrez
Greenhorn

Joined: Apr 04, 2012
Posts: 12
yes, I have setup the htmlunit in the netbeans and tried to use the sample code from the htmlunit website. below is the code that I use. But still things are not yet clear to me. if the code below can access the google.com, is there a way on how I could confirm it? what does the environment should I expect? based in website it is a GUI-less browser does it mean it will just run in command line?

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39537
    
  27
Yes, HtmlUnit code runs on the command line. Check the javadocs for what you can do with the HtmlPage object the call returns - it has methods to get at the page content.
Julius Gutierrez
Greenhorn

Joined: Apr 04, 2012
Posts: 12
I see, thanks for answering my query. It really helps me. I can now connect to a webpage using a command line app.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can I start with HtmlUnit
 
Similar Threads
Better JavaScript support than HtmlUnit?
Open Source Contribution
How would be the best way to parse HTML Content ?
java.lang.IllegalAccessError: tried to access field
Design patterns