Basic Questions
1. What is Selenium?
1. Explain the Selenium suite, its components, and its uses in automation testing.
2. What are the different types of locators in Selenium?
1. Describe locators like ID, Name, XPath, CSS Selector, Class Name, Tag Name, Link
Text, and Partial Link Text.
3. What is WebDriver in Selenium?
1. Discuss its role and why it’s important for browser automation.
4. What are the advantages of Selenium over other tools?
1. Open source, support for multiple browsers, and languages.
5. What is the difference between findElement() and findElements()?
1. findElement() returns a single WebElement, while findElements() returns
a list of WebElements.
Java Basics in Selenium Context
1. What are the access modifiers in Java?
1. Explain public, private, protected, and default.
2. What is the difference between Array and ArrayList in Java?
1. Explain their usage with examples.
3. How do you handle exceptions in Java?
1. Discuss try-catch, finally, and throw/throws.
4. What is a constructor in Java?
1. Explain its role and types (default and parameterized).
5. What are the differences between an Interface and an Abstract class?
1. Highlight key distinctions.
Selenium-Specific Questions
1. How do you handle dropdowns in Selenium?
1. Using the Select class.
2. How do you handle alerts and popups in Selenium?
1. [Link](), [Link](), and [Link]().
3. What are the different types of waits in Selenium?
1. Implicit wait, Explicit wait, and Fluent wait.
4. How do you switch between multiple windows or tabs in Selenium?
1. Using getWindowHandles() and switchTo().
5. What is the difference between get() and navigate().to() in Selenium?
1. get() waits for the page to load, whereas navigate().to() does not wait.
Practical Scenarios
1. Write a Selenium script to open a browser and navigate to a URL.
1. Basic script using WebDriver, [Link]("URL").
2. How would you write a script to locate a button using XPath and click on it?
1. Explain absolute vs. relative XPath and
[Link]([Link]("XPath")).click().
3. How do you handle dynamic web elements?
1. Use strategies like XPath with contains, starts-with, or indexes.
4. Write a script to handle a file upload in Selenium.
1. Use sendKeys() to send the file path to an input element.
5. How do you capture a screenshot in Selenium?
1. Use TakesScreenshot and getScreenshotAs() method.
Testing Concepts
1. What is the difference between Smoke Testing and Sanity Testing?
1. Discuss their objectives and when they are performed.
2. What is Regression Testing?
1. Explain its purpose and how Selenium is useful for it.
3. What is the TestNG framework, and why is it used with Selenium?
1. Discuss TestNG annotations, advantages, and examples.
4. How do you achieve parameterization in TestNG?
1. Using @DataProvider or TestNG XML file.
5. What is the Page Object Model (POM)?
1. Explain its structure and advantages.
HR and Soft Skill Questions
1. Why do you want to start your career in QA automation testing?
2. What challenges have you faced while learning Selenium and how did you overcome
them?
3. What are your strengths that make you a good fit for an automation testing role?
4. How do you keep yourself updated with the latest testing trends?
5. Are you comfortable working in a team and meeting deadlines? Share an example.