1
General testingQa

9 Remarkable Differences between Selenium and Cypress

3 Mins read

So, let’s start off by discussing how Cypress compares to Selenium and see the differences between Selenium and Cypress. Cypress focuses on testing APIs (Application Programming Interfaces) which can range from a single view controller all the way down to individual web pages. Selenium focuses more on testing web applications and will test both server-side and client-side web components.

Selenium

Selenium is a web automation tool that allows you to drive browser-based applications by automating user actions and recording interactions with the program. However, in addition to using Selenium for automation, it can also be used for functional testing and debugging of end-to-end user scenarios. This means Selenium is an extremely powerful tool that can be used for almost any kind of software application including eCommerce websites, mobile apps, and desktop programs.

Cypress

Cypress is a very similar automation tool created by Xamarin which was released in October 2015. Cypress vs Selenium so that you can use this to help determine which one is better for your needs.

Both selenium and cypress are open-sourced .

Selenium is an open-source project that is supported by a large community of developers who contribute towards the project and help make it better. Selenium has been around for a very long time and has had a lot of time to mature which means it has many great features and plugins to improve your user experience. Cypress, on the other hand, is a brand new tool which means it still needs some work to catch up to selenium, but it also means that you can expect faster development because there aren’t as many contributors working on the project. Cypress has already implemented most of the popular plugins for Selenium like Page Object Model, WebDriverJS.

Differences between Selenium and Cypress

1) Speed

Cypress tests all run inside the browser, and Selenium can use either a real browser or a headless browser that does not require any browsers to be installed on your computer. Thus Cypress is slightly faster. 

2) Programming Skills

Both Cypress and Selenium will require some level of programming skills to get started with because they are not tools that simply allow you to click around on the screen like many of the other cross-browser automation tools such as Watir and Nightwatch.

3) Language Support

Cypress is built to be run on Javascript, and Selenium has many programming languages you can choose from to write your tests such as Java, C#, JavaScript, Ruby, and Python.

4) User Experience

Both Cypress and Selenium provide a similar experience when writing tests. Cypress uses its own terminal based driver that allows you to write tests using Javascript. Selenium uses a programming language called WebDriver which is similar to cypress but it runs inside of a browser (so you don’t need any additional software to run it). Both selenium and cypress do not require much coding experience ,but for those who have more programming skills can get the best of selenium . Selenium IDE can make writing those test extremely easy..

5) User Interface(UI)

Cypress is more modern in its user interface design than Selenium, and thus easier for users to navigate through. Cypress even offers a live preview of your test as it runs, whereas Selenium does not offer a live preview feature.

Cypress also provides a built-in file explorer for local development which is pretty cool!  I don’t know of any other testing tool that allows you to scan and view the files in your local development environment without having to install anything else on your computer.

6) Waiting times

Cypress has a built-in waiting time when running tests that can be set from 0ms to 4 seconds. 

Selenium does not have a built-in waiting time, but you can add in a sleep command in the code along with a delay for added waiting time.

7) Team Development (Large Scale Applications)

Selenium has been around since 2004 and is thus more widely used than Cypress which was just released in 2015.  The community is bigger and you will find more resources on how to use Selenium than Cypress.

8) Screenshot Capture

You can capture screenshots of the web application you are testing in both Cypress and Selenium.

Cypress offers a built-in screenshot capture feature that many other tool do not have. This is really nice because it means you don’t have to install any additional tools on your computer or write any additional code for this feature to work.

9) Mobile automation

Selenium allows you to automate mobile apps, but Cypress is more limited in this area and doesn’t support Android or iOS.

Conclusion

So, if I had to choose between Cypress Vs. Selenium, Cypress would be the winner for me. But based on your needs, you may not see the same benefits I have. The best thing to do is try out each one and use whichever one works best for you.

Both Cypress and Selenium are great tools so enjoy!

You might be interested in Selenium Ruby tutorial — How to get started Part I

You might be interested in 15 things to consider when choosing software testing tools

Don’t miss amazing tips!

1
Related posts
Automation testingQaRuby

Selenium Ruby Example And Deployment To The Cloud Grid

13 Mins read
Table of contents0.1 What is Selenium?0.2 How does Selenium WebDriver in Ruby work?0.3 How to use Selenium with Ruby?0.4 How to run…
General testingInterestingQa

Available Career Growth Paths In Software Testing

3 Mins read
Table of contents0.1 What Are The Available Career Growth Paths In Software Testing?0.2 Junior Level Possible careers:0.3 Mid Level Possible careers:0.4 Senior…
General testingQa

If You Want To Find Bugs - Do More Exploratory Testing

3 Mins read
Table of contents0.1 Exploratory testing basics0.2 Tips to get started with exploratory testing0.3 1) Set the purpose of your exploratory testing0.4 2)…

Leave a Reply

Your email address will not be published. Required fields are marked *

61 + = 63

×
Automation testingQa

Selenium Ruby tutorial — How to get started Part II