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.

ComponentPurpose
WebDriverlibrary/API that drives a real browser through its driver (chromedriver, geckodriver)
IDEbrowser extension to record and play back simple tests
Gridruns 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 sendKeys on 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?

SeleniumPlaywrightCypress
LanguagesJava, Python, C#, JS, RubyJS/TS, Python, Java, C#JS/TS only
BrowsersChrome, Firefox, Edge, SafariChromium, Firefox, WebKitChromium, Firefox, (WebKit experimental)
Auto-waitingno (explicit waits)yesyes
Grid / parallelSelenium Grid, cloud gridsbuilt-in workerspaid Cypress Cloud or plugins
Where usedmost enterprise / service-company projectsnew product teamsfront-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.