Short answer: choose Cypress when your team wants a JavaScript-first, integrated runner with time-travel debugging and a serial, retrying command model. Choose Selenium when WebDriver, multiple programming languages, broad browser infrastructure, or a separately chosen test runner is central to your stack. Neither tool is a universal speed or reliability winner; validate the choice with an equivalent slice of your own tests and CI environment.
What Cypress and Selenium actually are
Cypress is installed as a development dependency and opens the Cypress App for end-to-end or component tests. Its open mode runs a spec beside the application, displays a live Command Log, and provides snapshots and console output for local debugging (official open-mode guide).
Selenium is a browser-automation project built around WebDriver (WebDriver documentation). You select a supported language, browser, and test runner; Selenium supplies the browser-control layer rather than prescribing one testing style. The Selenium project’s stated priority is “Stable APIs and scalability of the infrastructure to run Selenium,” not a single opinion about how every team should test (Selenium project comparison article).
Decision guide: which should your team start with?
| Decision axis | Cypress | Selenium |
|---|---|---|
| Language and runner | Its documented setup is JavaScript/package-manager based; it supplies its own interactive runner. | Supports several languages and lets teams pair WebDriver with the test runner that fits their stack. Verify current language and framework support in the official docs. |
| Local debugging | Integrated app, command timeline, snapshots and console output in open mode. | Depends on your language, IDE and runner; assemble the debugging workflow you prefer. |
| Command model | Commands and queries are queued and run serially, with retry behavior for most commands. They are not ordinary Promises and are not awaited like Promises. | WebDriver calls follow the selected language binding and runner; you control waits, assertions and recovery in that ecosystem. |
| Browser coverage | Current installation documentation lists the latest three major Chrome, Edge and Firefox versions. WebKit is experimental; Electron is deprecated and planned for removal. | Use the Selenium browser matrix and the exact browsers installed in your CI images. The cited project pages do not provide a version-by-version matrix. |
| Origins and frames | Cross-origin navigation requires cy.origin(); cross-origin iframes are unsupported. HTTPS-to-HTTP navigation errors, and navigated URLs must use the same port. |
WebDriver can control browser contexts, but cross-origin behavior still depends on browser security, application design and your binding. |
| Infrastructure | Vendor CI guidance recommends at least 2 CPUs and 4 GB RAM; 8 GB or more is recommended for long runs or video recording. These are Cypress recommendations, not comparative benchmarks. | Selenium Manager can resolve or download drivers and, where possible, browsers, according to the Selenium project. Verify behavior for your Selenium release and environment. |
Use Cypress first when JavaScript developers value a single, visual local workflow and the application fits its origin and iframe rules. Use Selenium first when an existing Python, Java, C#, Ruby or other WebDriver-based stack, a particular browser matrix, or a separately managed runner is a hard requirement. For authentication through several domains, embedded third-party frames, or unusual browser/device combinations, build a small proof of concept in both tools before committing.
Build a Cypress test
Install and open the runner
- Install a current Node.js release supported by your project.
- From the application directory, install Cypress as a development dependency:
npm install --save-dev cypress - Open the app and choose end-to-end or component testing when prompted:
npx cypress open - Choose Chrome, Edge or Firefox rather than relying on Electron, which the current installation documentation marks as deprecated.
Package-manager lifecycle scripts, supported operating systems and browser prerequisites are documented on the Cypress installation page. In CI, allocate the vendor’s minimum guidance and increase memory for long suites or video.
Example end-to-end spec
describe('checkout', () => {
it('shows the payment page', () => {
cy.visit('https://example.test/checkout')
cy.get('[data-testid="pay-button"]').should('be.visible').click()
cy.contains('Payment details').should('be.visible')
})
})
The commands are queued, then executed in order. Cypress retries most queries and assertions until they pass or time out. A failed command stops the remaining chain; there is no built-in Promise-style catch recovery path. Write assertions at the point where the state matters instead of treating Cypress commands as interchangeable with async/await.
Cross-origin and iframe checks
When one test moves between origins, wrap the commands for the second origin in cy.origin(). Cypress does not support cross-origin iframes. It also errors when a test navigates from HTTPS to HTTP, and the destination must use the same port. These constraints can rule out a Cypress implementation of a login provider, payment widget or legacy embedded application; confirm the flow with a small experiment and consult the cross-origin guide.
Build a Selenium WebDriver test
Python example
Install the Python binding and use a browser available in the execution environment:
Free tools Windows power users keep installed
One-click scans. No signup required.
python -m pip install selenium
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
options = webdriver.ChromeOptions()
options.add_argument('--headless=new')
driver = webdriver.Chrome(options=options)
try:
driver.get('https://example.test/checkout')
WebDriverWait(driver, 15).until(
EC.element_to_be_clickable((By.CSS_SELECTOR, '[data-testid="pay-button"]'))
).click()
WebDriverWait(driver, 15).until(
EC.visibility_of_element_located((By.XPATH, "//*[contains(., 'Payment details')]")
))
finally:
driver.quit()
Selenium Manager may resolve a compatible driver and, where possible, a browser, but that behavior is release- and environment-dependent. Pin browser images in CI, record the Selenium version, and verify that the resolved browser is the one your support matrix requires.
Runner and wait strategy
Put the example in pytest, JUnit, NUnit, RSpec or another runner used by your team. Prefer explicit waits for a meaningful condition, as shown above, over fixed sleeps. Keep locators stable with test-specific attributes, isolate browser cleanup in teardown, and collect screenshots, page source and browser logs when a failure occurs. Parallel execution is an infrastructure decision: separate users, data and browser profiles so tests do not race on shared state.
Browser, origin and CI trade-offs
Coverage is a matrix, not a label
Cypress documents the latest three major Chrome, Edge and Firefox versions and experimental WebKit support. Electron is deprecated as a test browser. Selenium coverage depends on the browser/driver combinations your grid or CI images actually provide; consult its current matrix before promising support for a specific version. Run the same critical journeys against every browser you claim to support.
Scaling and maintenance
Cypress gives local developers a consistent app-and-runner experience, while Cypress Cloud is positioned in its documentation for run history and analytics. Selenium’s WebDriver model can fit an existing grid or cloud infrastructure and multiple language teams, but you own the choices around runner, parallel workers, browser images, test data and observability. Compare queue time, retry policy and failure triage on your own CI rather than accepting an unmeasured “faster” claim.
Recommended Free Tools
Cost and reliability evidence
The cited official material does not establish an apples-to-apples speed, flakiness, maintenance-cost or market-share winner. Make a representative pilot: identical journeys, the same browsers, clean and warm runs, parallel and serial modes, and a fixed observation period. Track pass rate, time to diagnose failures, infrastructure minutes and browser-version coverage.
Rank #4
Common failures and fixes
- Cypress commands treated as Promises: remove ordinary
awaitusage and use Cypress chaining and assertions. - Test continues after a failure: split the flow into focused tests; Cypress stops the failed command chain rather than offering built-in catch recovery.
- Cross-origin error: use
cy.origin()for supported cross-origin steps, or move that integration to a tool and architecture that can exercise the required flow. - Iframe cannot be queried: Cypress does not support cross-origin iframes; test the provider independently or use Selenium/WebDriver where the browser interaction is feasible.
- HTTPS-to-HTTP navigation fails: serve the test target over HTTPS or redesign the flow; Cypress blocks that transition.
- Electron-specific failure: switch to an installed Chrome, Edge or Firefox browser because Electron is deprecated.
- Driver/session startup error in Selenium: check browser and Selenium versions, container dependencies, executable permissions and Selenium Manager’s resolution logs; pin a known-good image if automatic resolution is unsuitable.
- Intermittent element-not-found error: replace sleeps with condition-based waits, ensure the test data is ready, and use stable locators.
- CI crashes or video recording fails: compare resources with Cypress’s guidance of 2 CPUs/4 GB RAM minimum and 8 GB or more for long runs or video; treat those figures as vendor guidance, not a benchmark.
Or skip the browser setup: ScreenshotNeo
If the task is producing a page image or PDF rather than asserting an interactive workflow, ScreenshotNeo is the first alternative to try. One GET request captures PNG, JPEG, WebP or PDF; it accepts cookie banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing status. It also provides an MCP server for AI agents, with take_screenshot, get_page_info and capture_pdf.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the complete options and authentication details in the ScreenshotNeo documentation. Features include full-page lazy-image loading, CSS-selector element capture, dark mode, device presets and custom viewports, retina scale, PDF paper and page controls, custom CSS/JavaScript, clicks, selector/delay/network-idle waits, request and resource blocking, custom headers/cookies/user agents, timezone and geolocation, transparent backgrounds, resizing, TTL caching, signed image links, asynchronous webhooks, bulk capture of 100 URLs per call, usage API and OpenAPI compatibility.
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
The Free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
How to make the final choice
- List required languages, runners, browsers, versions, origins and iframe interactions.
- Implement the same two or three business-critical journeys in Cypress and Selenium where both are viable.
- Run them in the production-like CI image, including parallel workers and failure artifact collection.
- Score setup effort, debugging time, browser coverage, resource use and test-data isolation; do not substitute a vendor claim for your measurements.
- Choose the tool that satisfies hard constraints first, then optimize the workflow your team will maintain.
Frequently Asked Questions
Can Cypress and Selenium be used in the same organization?
Yes. Teams can use Cypress for fast local application-focused suites and Selenium for language-specific, browser-grid or legacy integration coverage, provided ownership, test data and CI reporting are clearly separated.
Best Value
Does Selenium automatically make tests cross-browser?
No. WebDriver enables browser control, but you still must provision and run the browser versions in your support matrix and handle browser-specific behavior.
Should I replace Selenium because Cypress has a visual runner?
Not automatically. Visual debugging is valuable, but language fit, origins, iframes, browser versions and existing infrastructure are usually stronger selection constraints.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →




