0

I want to have selenium to run on one server like ubuntu, centos and to run all browsers check on that linux (centos or ubuntu server). So check of ie6, ie7, ie8, ie9, chrome, firefox etc.

But then I think this is not possible, because for ie we need windows machine. Or if we remove the ie and only want to test on chrome and firefox, can we do that on selenium rc on ubuntu or centos? Then I think on that server version I need to install firefox.

I think the main thing is that I don't get how the selenium server can work with actually not having browser installed or it can't?

Can anyone give me some instruction on this, I did read some documentation and nice tutorials, but this is not very clear to me.

1 Answers1

1

Selenium Server is just an application that can send commands to web browsers. But, of course, you need a browser for that. If there's no browser and you write your tests in Selenium 2 (WebDriver), you can use HtmlUnitDriver (JavaDoc) which is inbuilt and doesn't actually open any browser. You could have read about it as "the in memory browser".

You could also check for presence of the browser by possibly doing something in the way of

WebDriver driver;
try {
    driver = new InternetExplorerDriver();
catch (WebDriverException e) {
    System.out.print("IE not found.");
    try {
        driver = new FirefoxDriver();
    } catch (WebDriverException e) {
        System.out.print("FF not found.");
    }
    // etc.
}
Petr Janeček
  • 37,768
  • 12
  • 121
  • 145