---
title: Pick a browser and operating system to run your Selenium test
description: Selecting the browser and environment to run your Selenium test.
source_url:
  html: https://testingbot.com/support/getting-started/environment.html
  md: https://testingbot.com/support/getting-started/environment.html/index.md
---
#### Intro

  - [API Clients](https://testingbot.com#clients)
  - [Authentication](https://testingbot.com#authentication)

#### Browsers & devices
[GET List of browsers](https://testingbot.com#browsers)
#### User

  - [GET Access your user info](https://testingbot.com#user)
  - [PUT Edit your user info](https://testingbot.com#useredit)

#### Team Management

  - [GET Get Team Info](https://testingbot.com#team)
  - [GET Get users in your team](https://testingbot.com#users)
  - [GET Retrieve a specific user in your team](https://testingbot.com#userteam)
  - [POST Create a user in your team](https://testingbot.com#createuser)
  - [PUT Update a user in your team](https://testingbot.com#updateuser)
  - [POST Reset credentials for a specific user in your team](https://testingbot.com#resetkeys)

#### Tests

  - [GET Retrieve your tests](https://testingbot.com#tests)
  - [GET Specific test info](https://testingbot.com#singletest)
  - [PUT Update a test](https://testingbot.com#updatetest)
  - [DEL Delete test](https://testingbot.com#deletetest)
  - [PUT Stop test](https://testingbot.com#stoptest)

#### Builds

  - [GET Retrieve all builds](https://testingbot.com#builds)
  - [GET Tests for a build](https://testingbot.com#singlebuild)
  - [DEL Delete a build](https://testingbot.com#deletebuild)

#### Devices

  - [GET Retrieve all Devices](https://testingbot.com#devices)
  - [GET Retrieve available Devices](https://testingbot.com#available-devices)
  - [GET Device Details](https://testingbot.com#devicedetails)

#### Screenshots

  - [POST Take screenshots](https://testingbot.com#takescreenshots)
  - [GET Retrieve screenshots](https://testingbot.com#retrievescreenshots)
  - [GET Screenshot history](https://testingbot.com#listscreenshots)

#### Tunnel

  - [POST TestingBot Tunnel List](https://testingbot.com#apitunnellist)
  - [DEL TestingBot Tunnel Delete](https://testingbot.com#apitunneldelete)

#### Codeless Automation Tests

  - [GET List Codeless Tests](https://testingbot.com#listlab)
  - [GET Specific Codeless test info](https://testingbot.com#labtest)
  - [POST Create a Codeless test](https://testingbot.com#createtest)
  - [DEL Delete Codeless test](https://testingbot.com#labtestdelete)
  - [PUT Update Codeless test](https://testingbot.com#labtestupdate)
  - [POST Schedule Codeless Test](https://testingbot.com#labtestschedule)
  - [POST Codeless Test Alert](https://testingbot.com#labtestalert)
  - [POST Codeless Test Report](https://testingbot.com#labtestreport)
  - [POST Modify Test Steps](https://testingbot.com#labteststeps)
  - [GET List Test Steps](https://testingbot.com#labteststepslist)
  - [GET Get Browsers for Test](https://testingbot.com#labtestbrowsers)
  - [POST Update Browsers for Test](https://testingbot.com#labtestbrowsersupdate)
  - [POST Run a specific Codeless test](https://testingbot.com#runlabtest)
  - [PUT Stop a specific Codeless test](https://testingbot.com#stoplabtest)
  - [POST Run all Codeless tests](https://testingbot.com#runlabtests)
  - [GET Test Job](https://testingbot.com#testjob)
  - [POST Webhook](https://testingbot.com#apicallback)

#### TestLab Suites

  - [GET List Codeless Suites](https://testingbot.com#suites)
  - [GET Get Codeless Suite Details](https://testingbot.com#suite)
  - [POST Run a specific Codeless suite](https://testingbot.com#runlabsuite)
  - [POST Create a Codeless Suite](https://testingbot.com#createtesuite)
  - [POST Delete a Codeless Suite](https://testingbot.com#deletesuite)
  - [GET Get Browsers for Codeless Suite](https://testingbot.com#suitebrowsers)
  - [POST Update Browsers for Codeless Suite](https://testingbot.com#updatesuitebrowsers)
  - [GET Get tests for a Codeless Suite](https://testingbot.com#suitetests)
  - [POST Add tests to a Codeless Suite](https://testingbot.com#suitetests)
  - [DEL Remove tests from a Codeless Suite](https://testingbot.com#removesuitetests)

#### TestingBot Storage

  - [POST Upload to Storage](https://testingbot.com#upload)
  - [POST Update uploaded File](https://testingbot.com#uploadupdate)
  - [GET Uploaded File Data](https://testingbot.com#uploadfile)
  - [GET Uploaded files List](https://testingbot.com#filelist)
  - [DEL Delete a file from Storage](https://testingbot.com#filedelete)

#### Configuration

  - [GET IP Ranges for whitelisting](https://testingbot.com#ipranges)

#### Share

  - [GET Share Test](https://testingbot.com#sharetest)

## How to select the Operating System and Browser you want to run your tests on

* * *

You can choose between various [browsers](https://testingbot.com/support/web-automate/browsers) and operating systems to run your test on.

After you've determined the browser and OS you want to run your test on, you need to specify what you would like in your test.

Below are some examples on how to do this with Selenium RC code:

### PHP Code:

In the example below we will run the test on Firefox 8.

    <?php
    
    	class SimpleTest extends PHPUnit_Extensions_TestingBotTestCase
    	{
    	    protected function setUp()
    	    {
    	    	$this->setBrowserVersion(8);
    	    	$this->setPlatform('Windows');
    	    	$this->setBrowser('Firefox');
    	    }
    	}

### Ruby Code:

In the example below we will run the test on Safari 5.

    require "rubygems"
    gem "selenium-client"
    require "selenium/client"
    gem 'test-unit'
    require 'test/unit'
    
    gem "testingbot"
    require "testingbot"
    class ExampleTest < TestingBot::TestCase
      attr_reader :browser
    
      def setup
        @browser = Selenium::Client::Driver.new \
            :host => "hub.testingbot.com",
            :port => 80,
            :browser => "firefox",
            :version => "latest",
            :platform => "WINDOWS",
            :url => "https://testingbot.com",
            :timeout_in_second => 60
        browser.start_new_browser_session
      end

### C# Code:

In the example below we will run the test on Internet Explorer 9.

    using NUnit.Framework;
    using System;
    using Selenium;
    using System.Web;
    using System.Text;
    using System.Net;
    using OpenQA.Selenium;
    using OpenQA.Selenium.Remote;
    
    namespace Test
    {
        [TestFixture()]
        public class Test
        {
           private IWebDriver driver;
    
            [SetUp]
            public void Init()
            {
                DesiredCapabilities capabilities = DesiredCapabilities.InternetExplorer();
                capabilities.SetCapability(CapabilityType.Version, "9");
    			capabilities.SetCapability("api_key", "REPLACE_API_KEY");
                capabilities.SetCapability("api_secret", "REPLACE_API_SECRET");
    
                driver = new RemoteWebDriver(
                    new Uri("http://hub.testingbot.com/wd/hub/"), capabilities);
            }
    
            [Test]
            public void TestCase()
            {
                driver.Navigate().GoToUrl("https://www.google.com");
                StringAssert.Contains("Google", driver.Title);
            }
    
            [TearDown]
            public void Cleanup()
            {
                driver.Quit();
            }
       }
    }
