Selenium with Java - 100+ Interview Questions &
Answers
Core Java
Q1. What are OOPs concepts in Java? Explain each with an example.
Q2. Difference between Interface and Abstract Class?
Q3. Difference between Overloading and Overriding?
Q4. What is the difference between String, StringBuilder, and StringBuffer?
Q5. Explain Exception Handling with keywords try, catch, finally, throw, and throws.
Q6. Difference between Checked and Unchecked Exceptions?
Q7. Explain Collections Framework in Java.
Q8. Difference between HashMap, HashTable, and ConcurrentHashMap.
Q9. What are Wrapper classes in Java?
Q10. Difference between final, finally, and finalize.
Selenium Basics
Q11. What is Selenium? List its components.
Q12. Difference between Selenium 3 and Selenium 4.
Q13. Explain WebDriver Architecture.
Q14. Difference between findElement() and findElements().
Q15. Explain all types of locators in Selenium with examples.
Q16. Difference between Absolute and Relative XPath.
Q17. How to write Dynamic XPath using contains, starts-with, and text().
Q18. Difference between get() and navigate().to().
Q19. Difference between getText() and getAttribute().
Q20. Difference between click() and submit().
Selenium Advanced
Q21. Difference between Implicit, Explicit, and Fluent Waits?
Q22. How to handle multiple windows in Selenium?
Q23. How to handle iframes in Selenium?
Q24. How to handle alerts in Selenium?
Q25. How to handle dropdowns in Selenium?
Q26. How to handle dynamic tables in Selenium?
Q27. Explain Actions class with examples.
Q28. How to use JavaScriptExecutor in Selenium?
Q29. How to take screenshots in Selenium?
Q30. How to handle file upload and download in Selenium?
Framework & TestNG
Q31. Explain commonly used TestNG annotations.
Q32. Difference between SoftAssert and HardAssert.
Q33. How to parameterize tests in TestNG?
Q34. What is the difference between TestNG and JUnit?
Q35. What is Page Object Model (POM)?
Q36. What is Page Factory in Selenium?
Q37. Explain Data Driven Framework with an example.
Q38. What is Hybrid Framework in automation testing?
Q39. Explain the use of Maven in Selenium projects.
Q40. How do you integrate Selenium scripts with Jenkins?
Industry & Real-Time Scenarios
Q41. How do you automate a login page with dynamic IDs?
Q42. How do you handle CAPTCHA in Selenium automation?
Q43. How do you automate file upload and download?
Q44. How do you test responsive design with Selenium?
Q45. What are common challenges in Selenium automation?
Q46. Explain defect reporting workflow using Jira.
Q47. How do you select test cases for automation?
Q48. Explain daily tasks of an automation engineer.
Q49. What is Agile methodology in Testing?
Q50. What are the limitations of Selenium?