Selenium RC - Installation

Here i took sample of C# language.
We can download Selenium RC from http://seleniumhq.org/download/.
selenium-remote-control-version-.zip file will be downloaded. We should extract to where we need to create Selenium RC tests. Previously we have to start selenium RC using a batch file, Now sauce RC available as free executable file to start the Remote control while system start up. We can find it from the following link http://saucelabs.com/downloads.We need to add the following reference:



  • ThoughtWorks.Selenium.Core.dll

We have to initialize the class as:

selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://yoursitename.com/");
selenium.Start();
To start the browser
That all!
We can start writing classes and methods under [Test Method].

Here a Sample:
using Selenium;

[TestClass]
    public class Roles
    {
        public Roles()
        {
            //
            // TODO: Add constructor logic here
            //
        }

private TestContext testContextInstance;
        private static ISelenium selenium;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

 [ClassInitialize]
        public static void MyClassInitialize(TestContext testContext)
        {

            selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://eduvisiontest.info/");
            selenium.Start();
        }

[TestMethod]
        public void TestMethod1()
        {
            //
            // TODO: Add test logic here
            //
        }

10 comments:

  1. Thanks for the great information in your blog Selenium

    ReplyDelete
  2. Thanks for sharing great information in your blog. Got to learn new things from your Blog . It was very nice blog to learn about Selenium

    ReplyDelete
  3. Looking for best training in SELENIUM, take a glance at http://thecreatingexperts.com/selenium-training-in-chennai/

    ReplyDelete
  4. I was looking for Selenium and Appium training in Chennai and got a link,it was the CREATING EXPERTS.

    If you are looking for one click the link below and contact 8122241286.

    http://thecreatingexperts.com/appium-training-in-chennai/
    http://thecreatingexperts.com/selenium-training-in-chennai/

    ReplyDelete
  5. THE CREATING EXPERTS is one of the leading training provider in SELENIUM they provide hands on training with real time scenario

    http://thecreatingexperts.com/selenium-training-in-chennai/

    contact +91-08122241286

    ReplyDelete
  6. The Creating Experts provides training in SELENIUM

    http://thecreatingexperts.com/selenium-training-in-chennai/

    contact +91-08122241286

    ReplyDelete
  7. Nice blog...

    Selenium training institute which provides Real Time Hands on Training…THE CREATING EXPERTS

    http://thecreatingexperts.com/selenium-training-in-chennai/


    contact-8122241286

    ReplyDelete
  8. SELENIUM training in Chennai by TE CREATING EXPERTS ,they provide you hands on training with real time scenarios

    http://thecreatingexperts.com/selenium-training-in-chennai/

    contact 8122241286

    ReplyDelete
  9. Hi, all nice blog for a long time i was searching for a real time trainer and landed with my trainer in selenium
    SELENIUM training is provided by THE CREATING EXPERTS in CHENNAI

    http://thecreatingexperts.com/selenium-training-in-chennai/

    Contact 8122241286 for more info

    ReplyDelete
  10. NICE BLOG...Selenium training in CHENNAI provided by THE CREATING EXPERTS

    http://thecreatingexperts.com/selenium-training-in-chennai/

    CONTACT 8122241286.

    ReplyDelete