-
1. Re: Configure HtmlUnitDriver
kpiwko Aug 5, 2014 4:02 AM (in response to yan.langlois)1 of 1 people found this helpfulHello Yan,
this is currently not possible, as Selenium does not allow access to WebClientOptions without subclassing HtmlUnitDriver. I've filled [ARQ-1836] Support HtmlUnitDriver client options - JBoss Issue Tracker with more details, Drone could in theory bridge the gap.
Have you though of using phantomjs instead if you need to test headless?
Thanks,
Karel
-
2. Re: Configure HtmlUnitDriver
yan.langlois Aug 5, 2014 5:44 AM (in response to kpiwko)Thank you for your JIRA issue, I think it will be very usefull.
For your information, I cannot use PhantomJS because I work on a project where the login page is redirected via a HTTP 302 redirect. PhantomsJS does not seem to follow this kind of redirection. Nevertheless, I found a workarround with this property of HTMLUnitDriver :
It seems that firefox browser version within HTMLUnit copes better with JavaScript.
With RichFaces, I also needed to change the default CSS parser. RF depend on net.sourceforge.cssparser:cssparser:0.9.5. I use version 0.9.14. My pom looks like that :