Difference between Cucumber and Selenium
Before knowing the differences between cucumber and Selenium first, let's take a quick introduction of these.
It is a Behavior Driven Development tool used to develop test cases for the behavior of software's functionality. It plays a supporting role in automated testing.
In other words, cucumber is a software tool used by the testers to develop test cases for the testing of behavior of the software.
Cucumber tool makes the test scripts very easy, because the test cases are written in a simple English text, which anybody can understand without any technical knowledge. This simple English text is called the Gherkin language.
It allows business analysts, developers, testers, etc. to automate functional verification and validation in an easily readable and understandable format (e.g., plain English).
Cucumber tool can be used along with various testing tools such as Watir, Selenium, and Capybara, etc.
Cucumber tool was originally written in the "Ruby" programming language. It was exclusively used only for testing of Ruby as a complement to the RSpec BDD framework.
Selenium is one of the most widely used open-source Web UI (User Interface) automation testing suite. Selenium supports automation across different browsers, platforms, and programming languages.
Selenium can be easily deployed on platforms such as Windows, Linux, Solaris, and Macintosh. Moreover, it supports OS (Operating System) for mobile applications like iOS, windows, mobile, and android.
Selenium supports a variety of programming languages through the use of drivers specific to each language. Languages supported by Selenium include C#, Java, Perl, PHP, Python and Ruby. Currently, Selenium Web driver is most popular with Java and C#. Selenium test scripts can be coded in any of the supported programming languages and can be run directly in most modern web browsers. Browsers supported by Selenium include Internet Explorer, Mozilla Firefox, Google Chrome, and Safari.
Now, let's have a look at fundamental differences between Cucumber and Selenium: