
Getting started with Selenium can be a tough task! But to help you build a solid foundation, you’ll need to understand the ins and outs of Selenium, how it works, and some tips on how to get started.
What is Selenium?
The Selenium tool set consists of the Selenium IDE, Selenium Grid, and the Selenium WebDriver. Selenium is an open source tool designed to create browser-based automated suites and tests for web applications across environments.
What Are the Limitations of Selenium?
Before you get started, it is important to understand what Selenium can and cannot do when automating your tests.
Selenium is designed for testing your web applications in a variety of browsers. The Selenium WebDriver can only manipulate web pages inside of the browser.
What Kind of Skills Will You Need?
Once you’ve settled on using Selenium, you will need to choose a programming language. Selenium supports many different language bindings including Java, JavaScript, PHP, Ruby, C#, and Python, allowing you to write your tests in the language of your choice. Each of these languages provide several frameworks that integrate with Selenium to make testing easier.
Selenium does offer an IDE that requires minimal coding, however we will focus on the Selenium WebDriver and its programming language bindings.
Choosing a Testing Framework
As mentioned, there are many testing frameworks that you could work with to get started with Selenium, but we will go over two common types of testing frameworks as a starting point.
BDD (Behavior Driven Development)
BDD has become increasingly popular over the past couple of years in helping agile development teams be more collaborative among developers, QA and non-technical or business participants in software projects.
With BDD testing, it’s Gherkin language allows you to write your tests in a way that can be easily read by anyone on your team. Creating simple scenarios to test your application’s behavior from the end users’ perspective that allow a shared understanding of user requirements, making test automation easier and faster. These frameworks read as plain text specifications and can generate a report, validating success or failure.
Some examples of BDD frameworks are Cucumber, Behave, and Jasmine. Check them out!
Unit
Another type of testing framework is Unit Testing frameworks. Unit testing frameworks allow you to test individual components of your site with the objective of isolating each section and verifying its correctness. These frameworks allow the use of pre-defined assertion methods to help with this verification process.
Some examples of unit testing frameworks are TestNG, JUnit, NUnit and PHPUnit, Check them out!
Get Started Testing
Now that you have a good blue print on what makes up the Selenium stack, benefits of using Selenium, along with questions to ask along the way as you try to implement this tool into your work flow, it’s time to get started! Since Selenium is an open source tool, you can download it and try it out at SeleniumHQ.
For all listed languages and frameworks mentioned above, you can find detailed documentation with examples to help you get started at the CrossBrowserTesting Help site!
Leave a Reply