Careeroza
Basic Interview Questions
What is Selenium and what are its components?
Selenium is an open-source suite for automating web browsers. It supports Java, Python, C#, JavaScript and Ruby, and all major browsers.
| Component | Purpose |
|---|---|
| WebDriver | library/API that drives a real browser through its driver (chromedriver, geckodriver) |
| IDE | browser extension to record and play back simple tests |
| Grid | runs tests on many machines and browsers in parallel |
Selenium RC (version 1) is retired; Selenium 4 uses the W3C WebDriver protocol.
What are the limitations of Selenium?
- Only web applications: no desktop apps, no native mobile apps (use Appium for mobile).
- Cannot automate CAPTCHA, OTP from an SMS, or barcode scanning (use test hooks or fixed OTPs in QA).
- No built-in reporting or test runner: needs TestNG/JUnit, Extent/Allure.
- Cannot read images or check visual layout pixel by pixel (use visual testing tools).
- Windows dialogs (file explorer, print) are outside the browser; upload works with
sendKeyson the file input.
Explain the Selenium 4 WebDriver architecture.
Test code (Java bindings) --W3C WebDriver JSON over HTTP--> ChromeDriver --CDP--> Chrome
driver.findElement(...) POST /session/{id}/element (browser driver) (real browser)Your test calls the Java client library; it sends W3C WebDriver commands as HTTP requests to the browser driver, which controls the browser and returns the response. Selenium 4 removed the old JSON Wire Protocol, so commands are standard across browsers. Selenium Manager (since 4.6) downloads the matching driver automatically.
What is the difference between Selenium, Playwright and Cypress?
| Selenium | Playwright | Cypress | |
|---|---|---|---|
| Languages | Java, Python, C#, JS, Ruby | JS/TS, Python, Java, C# | JS/TS only |
| Browsers | Chrome, Firefox, Edge, Safari | Chromium, Firefox, WebKit | Chromium, Firefox, (WebKit experimental) |
| Auto-waiting | no (explicit waits) | yes | yes |
| Grid / parallel | Selenium Grid, cloud grids | built-in workers | paid Cypress Cloud or plugins |
| Where used | most enterprise / service-company projects | new product teams | front-end teams |
Selenium is still the most asked tool in Indian QA job descriptions because of its language choice and long history in enterprise projects.