CTS – Selenium Interview Questions


  1. What is the framework you are using?
  2.  

  3. Can you explain the framework functionality? deep dive..
  4.  

  5. Your role in your automation team.
  6.  

  7. Do you know Robot framework?
  8.  

  9. Explain TestNG XML structure.
  10.  

  11. How do you connect to a database in java
  12.  

  13. What are the different ways your database url can be ? apart from http://
  14.  

  15. Is it mandate to close statment object in DB code ?
  16.  

  17. Write code for db connection and walkthrough the code.
  18.  

  19. Can you explain about List Interface.
  20.  

  21. Usage of List interface (explained with select class).
  22.  

  23. Can you impose selectByVisibleText / selectByIndex methods on list interface reference created (continuation to above).
  24.  

  25. Without those methods how do you select the dropdown values
  26.  

  27. Ans: (ls.get(index).click()) where ls is the getOptions() reference.
  28.  

  29. How do you select the 2nd select value from the dropdown (selectByIndex)
  30.  

  31. How do you do parameterization in testNG.
  32.  

  33. Give an example for dataprovider.
  34.  

  35. some questions on Object class (can it have array type? why? etc)
  36.  

  37. How did you do parameterization in your framework
  38.  

  39. Why specifically JXL? whynot APACHE POI.
  40.  

  41. What is the difference between jxl and apache poi.
  42.  

  43. 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).
  44.  

  45. What type of reports you generate.
  46.  

  47. What are the ways in you can create your own customized html report (Ans: XML to HTML / directly in notepad)
  48.  

  49. Can you design a framework on your own and what would be your considerations ?
  50.  

  51. Comparing 2.45.0 jar and 2.46.0 jar what are the advanced features in 2.46.0?
  52.  

  53. 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?
  54.  

  55. How will you verify the colour of the heading in a webpage is as expected (colour)?
  56.  

  57. There are multiple frames in a webpage. Say three frames one within another, how will you find an element in the inner most frame?
  58.  

  59. What is WebElement? Is it interface or class? explain?
  60.  

  61. What is compile time and Run time polymorphism?
  62.  

  63. One Element is not identifiable in a webpage. Why it is not identifiable in a webpage? (Note: It is not an Alert)
  64.  

  65. Where will you have your locators in your framework?
  66.  

  67. How will you pass data without using ‘Sendkeys’ method?
  68.  

  69. What are the methods available in an ‘Alert’?
  70.  

  71. How will you click on a button without using ‘Click’ method? [Keys.ENTER not expected]
  72.  

  73. Difference between Interface and Abstract Class?
  74.  

  75. Load a browser and go to google page
  76.  

  77. I have 100 test cases with me. How will you estimate?
  78.  

  79. How many Scripts you will automate per day ? How many Simple, Medium, Complex test cases?
  80.  

  81. Why do you need a framework? what is the use?
  82.  

  83. Have you used Java Executor?
  84.  

  85. Have you created Abstract class in your project?
  86.  

  87. “driver.findElement(By.id)” – What is driver here? What is ‘By’ here?
  88.  

  89. What is the IDE you are using? How will you get the Jar files in it?
  90.  

  91. How will you read data from an Excel? write code and explain?
  92.  

  93. What is the folder structure of your framework? Explain?
  94.  

  95. How will you get all the links in a webtable?