Cypress is mainly used for end-to-end testing of web applications. It runs tests directly in the browser and is known for fast, reliable testing with automatic waiting.
Click to reveal answer
intermediate
How does Selenium differ from Cypress in test execution?
Selenium controls browsers externally using WebDriver, supporting many browsers and languages. Cypress runs inside the browser itself, which limits browser support but improves speed and debugging.
Click to reveal answer
intermediate
What is a key advantage of Playwright over Selenium?
Playwright supports multiple browsers (Chromium, Firefox, WebKit) with a single API and offers automatic waiting and network interception, making tests more stable and easier to write than Selenium.
Click to reveal answer
beginner
Which tool is best for testing modern web apps with fast feedback and easy debugging?
Cypress is best for modern web apps when you want fast feedback and easy debugging because it runs tests inside the browser and provides detailed error messages and snapshots.
Click to reveal answer
intermediate
What is a limitation of Cypress compared to Selenium and Playwright?
Cypress supports only Chromium-based browsers and Firefox, while Selenium and Playwright support more browsers including Safari. Cypress also does not support multiple tabs or multiple domains well.
Click to reveal answer
Which testing tool runs tests inside the browser for faster execution?
ACypress
BSelenium
CPlaywright
DJUnit
✗ Incorrect
Cypress runs tests inside the browser, which makes execution faster and debugging easier.
Which tool uses WebDriver protocol to control browsers externally?
APuppeteer
BCypress
CPlaywright
DSelenium
✗ Incorrect
Selenium uses the WebDriver protocol to control browsers externally.
Which tool supports testing on WebKit browser engine natively?
ASelenium
BPlaywright
CCypress
DTestCafe
✗ Incorrect
Playwright supports WebKit, Chromium, and Firefox browsers natively.
Which tool is limited in supporting multiple browser tabs and domains?
ASelenium
BPlaywright
CCypress
DRobot Framework
✗ Incorrect
Cypress has limitations with multiple tabs and cross-domain testing.
Which tool provides automatic waiting for elements before actions?
ACypress and Playwright
BCypress
CPlaywright
DSelenium
✗ Incorrect
Cypress and Playwright provide automatic waiting for elements before actions. Selenium requires explicit waits.
Explain the main differences between Cypress, Selenium, and Playwright in terms of browser support and test execution.
Think about how each tool interacts with the browser and which browsers they support.
You got /4 concepts.
Describe scenarios where you would choose Cypress over Selenium or Playwright and why.
Consider developer experience and project requirements.
You got /4 concepts.
Practice
(1/5)
1. Which testing tool is known for its fast setup and mainly supports Chrome-family browsers?
easy
A. Selenium
B. Cypress
C. Playwright
D. JUnit
Solution
Step 1: Understand tool browser support
Cypress is designed for fast tests mainly in Chrome-family browsers.
Step 2: Compare with other tools
Selenium supports many browsers but requires more setup; Playwright supports multiple browsers with modern features.
Final Answer:
Cypress -> Option B
Quick Check:
Fast Chrome tests = Cypress [OK]
Hint: Fast Chrome-only tests? Think Cypress [OK]
Common Mistakes:
Confusing Selenium as fastest setup
Thinking Playwright only supports Chrome
Selecting unrelated tools like JUnit
2. Which of the following is a correct statement about Selenium?
easy
A. Selenium supports multiple programming languages and browsers.
B. Selenium is limited to Chrome browser only.
C. Selenium only supports JavaScript language.
D. Selenium requires no setup before running tests.
Solution
Step 1: Recall Selenium features
Selenium supports many programming languages like Java, Python, JavaScript, and many browsers.
Step 2: Eliminate incorrect options
It is not limited to JavaScript or Chrome, and it requires setup.
Final Answer:
Selenium supports multiple programming languages and browsers. -> Option A
Quick Check:
Multi-language, multi-browser = Selenium [OK]
Hint: Selenium = many languages + browsers [OK]
Common Mistakes:
Thinking Selenium supports only JavaScript
Believing Selenium works without setup
Assuming Selenium is Chrome-only
3. Consider this statement: "Playwright supports running tests on Chromium, Firefox, and WebKit browsers." Which tool does this describe?
medium
A. Playwright
B. Selenium
C. TestCafe
D. Cypress
Solution
Step 1: Identify browser support
Playwright supports Chromium, Firefox, and WebKit browsers natively.
Step 2: Match with tool features
Cypress mainly supports Chromium-based browsers; Selenium supports many but not WebKit directly; TestCafe is different.
Final Answer:
Playwright -> Option A
Quick Check:
Multi-browser including WebKit = Playwright [OK]
Hint: WebKit support means Playwright [OK]
Common Mistakes:
Assuming Cypress supports WebKit
Confusing Selenium with Playwright browser support
Selecting unrelated tools like TestCafe
4. You wrote a test script using Cypress but it fails to run on Firefox browser. What is the most likely reason?
medium
A. Your Firefox browser version is outdated.
B. You need to install Playwright to run Cypress tests on Firefox.
C. Cypress requires Selenium to run on Firefox.
D. Cypress does not support Firefox well yet.
Solution
Step 1: Understand Cypress browser support
Cypress primarily supports Chromium browsers; Firefox support is experimental and limited.
Step 2: Evaluate other options
Cypress does not depend on Selenium or Playwright; outdated browser or installing Playwright is unrelated.
Final Answer:
Cypress does not support Firefox well yet. -> Option D
Quick Check:
Limited Firefox support = Cypress issue [OK]
Hint: Cypress Firefox support is limited [OK]
Common Mistakes:
Thinking Cypress needs Selenium for Firefox
Blaming browser version without checking support
Assuming Playwright is needed for Cypress tests
5. You want to write end-to-end tests that run fast, support multiple browsers including Safari, and allow writing tests in JavaScript or Python. Which tool should you choose?
hard
A. Cypress
B. Selenium
C. Playwright
D. Mocha
Solution
Step 1: Analyze browser support needs
Safari support requires WebKit engine support, which Playwright provides.
Step 2: Consider language support and speed
Playwright supports JavaScript and Python and offers fast test execution with modern features.
Step 3: Compare with other tools
Cypress is fast but limited to Chromium browsers and JavaScript; Selenium supports many languages but is slower; Mocha is a test framework, not a browser automation tool.