Your assumptions are right, Luke. I tried what you suggested and it's
working now. Just a hint for users: I had to open a page with
cookies security policy. Thank you very much for your help.
On Jun 27, 5:43 pm, Luke Inman-Semerau <
luke.seme...@gmail.com> wrote:
> By shared session I'm guessing you mean within context of that website
> (after the user logs in?) Which would probably mean the site is using
> cookies to track the users session...
>
> If that assumption is correct then you can get the cookie from the firefox
> driver and set it in the HtmlUnit driver:
>
> WebDriver ff = new FirefoxDriver();
> WebDriver hu = new HtmlUnitDriver(BrowserVersion.FIREFOX_3_6);
>
> // do the firefox stuff
> ...
>
> // copy the cookies to htmlUnit driver
> for (Cookie c : ff.manage().getCookies()) {
> hu.manage().addCookie(c);
>
> }
>
> // do the html unit stuff
> ....
>