What are pros and cons of Cypress when compared to Selenium?

Cypress as an automation tool is picking up in the market. However, I wanted to know if there are any pros (and cons) of taking up Cypress when compared to Selenium?

1 Like

Hi Yanisleidi!

Let’s take a look at the advantages and cons of Cypress to understand if it’s the perfect tool for you.

Pros of Cypress:

  • Selenium involves implementing browser drivers for the script to communicate with the web elements on the page. However, because the test cases run directly inside the browser, installing Cypress requires no additional dependencies or downloads.

  • Cypress is used by both developers and QA engineers, whereas Selenium is solely for test automation. Cypress is based on JavaScript, which is a popular front-end programming language.

  • In Cypress, there is no additional IDE overhead. When you launch Cypress, it asks you to select an IDE to modify the test script.

  • When compared to Selenium, the Cypress framework produces more accurate results. It’s because Cypress has greater control over the entire automation process, allowing it to have a good comprehension of what is going on within and outside of the browser.

  • Cypress instances respond in real-time to application events and commands. Real-time reloads in Cypress automatically reload tests when changes are made in the application.

Cons of Cypress:

  • Cypress is currently only supported for the Chrome, Firefox, Edge, Brave, and Electron browsers. As a result, Cypress is a less favored option for cross-browser testing.

  • For the building of test cases, it only supports the JavaScript framework.

  • Cypress doesn’t support remote execution.

Read More about Cypress Vs Selenium in our blog: Selenium vs Cypress – Which Is Better in 2021?

2 Likes

Cypress interacts with browser directly, whereas selenium needs a driver a middleman to execute actions on browser. This makes Cypress automation faster compared to Selenium.

2 Likes