Hexaware – Selenium Interview Questions

  1. What is the framework you are using?
  2. Can you explain the framework functionality? deep dive..
  3. Your role in your automation team.
  4. Do you know Robot framework?
  5. Explain TestNG XML structure.
  6. How do you connect to a database in java
  7. What are the different ways your database url can be ? apart from http://
  8. Is it mandate to close statment object in DB code ?
  9. Write code for db connection and walkthrough the code.
  10. Can you explain about List Interface?
  11. Usage of List interface (explained with select class).
  12. Can you impose selectByVisibleText / selectByIndex methods on list interface reference created (continuation to above).
  13. Without those methods how do you select the dropdown values
  14. Ans: (ls.get(index).click()) where ls is the getOptions() reference?
  15. How do you select the 2nd select value from the dropdown?(selectByIndex)
  16. How do you do parameterization in testNG?
  17. Give an example for dataprovider.
  18. Some questions on Object class (can it have array type? why? etc)
  19. How did you do parameterization in your framework
  20. Why specifically JXL? whynot APACHE POI.
  21. What is the difference between jxl and apache poi.
  22. Can you write a sample code using JXL and walk through the code (they are very keen on the methods along with parameters and try to confuse us)
  23. What type of reports you generate.
  24. What are the ways in you can create your own customized html report (Ans: XML to HTML / directly in notepad)
  25. Can you design a framework on your own and what would be your considerations ?
  26. Comparing 2.45.0 jar and 2.46.0 jar what are the advanced features in 2.46.0?
  27. One webElement “India” (text) having same properties in all the builds. But the location of “India” keep changing in each build. Write code to find “India” in every build and click on the checkbox next to it?
  28. How will you verify the colour of the heading in a webpage is as expected (colour)?
  29. There are multiple frames in a webpage. Say three frames one within another, how will you find an element in the inner most frame?
  30. What is WebElement? Is it interface or class? explain?
  31. What is compile time and Run time polymorphism?
  32. One Element is not identifiable in a webpage. Why it is not identifiable in a webpage? (Note: It is not an Alert)
  33. Where will you have your locators in your framework?
  34. How will you pass data without using ‘Sendkeys’ method?
  35. What are the methods available in an ‘Alert’?
  36. How will you click on a button without using ‘Click’ method? [Keys.ENTER not expected]
  37. Difference between Interface and Abstract Class?
  38. Load a browser and go to google page
  39. I have 100 test cases with me. How will you estimate?
  40. How many Scripts you will automate per day ? How many Simple, Medium, Complex test cases?
  41. Why do you need a framework? what is the use?
  42. Have you used Java Executor?
  43. Have you created Abstract class in your project?
  44. “driver.findElement(By.id)” – What is driver here? What is ‘By’ here?
  45. What is the IDE you are using? How will you get the Jar files in it?
  46. How will you read data from an Excel? write code and explain?
  47. What is the folder structure of your framework? Explain?
  48. How will you get all the links in a webtable?