I have been using HTMLUnit . It suits my requirements well. But it seems to be extremely slow. for example : I have automated the following scenario using HTMLUnit
I recommend also to set a time limit to the javascript:
client.setJavaScriptTimeout(30000); //e.g. 30s