Web Developer? Love Filling out Forms? If so Selenium is not for you

Posted: February 22nd, 2017 | Author: | Filed under: general | Comments Off on Web Developer? Love Filling out Forms? If so Selenium is not for you

Put quite simply Selenium is a remote control for your browser.  You can record actions like clicking links and play them back.  Selenium also lets you write functional tests for your browser, and in fact with Selenium RC you can test in every browser.  If you are fully immersed in TDD then writing tests with assertions should be second nature to you.  Selenium lets you make those assertions once the Controller has fetched the data from the model then made a call to jquery to write some javascript to the page that then fetches something else from the server, something your basic unit test simply can’t do.

First let’s get Selenium installed.  Selenium IDE is a firefox plugin which is where you’ll write most of your tests (you can write them in other programming languages as well to interact with Selenium RC but more on that later).  Install the plugin right from the seleniumhq.org website.

Now let’s write our first test.

You’ll find Selenium IDE from the Tools menu under firefox (Note my screenshots will be for firefox mac but the windows/linux versions are the same).  Upon opening the IDE you’ll be presented with this screen:

Now let’s write our first test.  For this example let’s pick something repeatable and testable


Comments are closed.