Can we run firefox Browser in background while testing using selenium FirefoxDriver?

555 views
Skip to first unread message

SAI ROSHAN

unread,
Jul 28, 2011, 11:15:39 AM7/28/11
to webdriver
Hi Pals,
I have a set of test case prepared using eclipes Ide, that runs on
firefox browser.
i an using FirefoxDriver in the test cases.
Now we need to run the test cases without opening the browser
window.
Can some one give me the best possible solution?

I think HtmlUnitDriver can be used...but my test cases are already up
and running and creating a new set of test cases using HtmlUnitDriver
will need lot of effort..

Please help me with a feasible solution

Daniel Wagner-Hall

unread,
Jul 28, 2011, 11:43:01 AM7/28/11
to webd...@googlegroups.com
If you're not using Windows, you can use xvfb:

e.g. if you run tests by executing ant test, you run:
xvfb-run -a ant test

> --
> You received this message because you are subscribed to the Google Groups "webdriver" group.
> To post to this group, send email to webd...@googlegroups.com.
> To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
>
>

Bill Ross

unread,
Jul 28, 2011, 4:13:50 PM7/28/11
to webd...@googlegroups.com
> I think HtmlUnitDriver can be used...but my test cases are already up
> and running and creating a new set of test cases using HtmlUnitDriver
> will need lot of effort..

What if you refactor so that the tests take an optional arg that
switches the driver instantiation to HtmlUnitDriver?

Bill

Reply all
Reply to author
Forward
0 new messages