CTS Interview Questions

Company-wise Selenium and QA interview preparation page.

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. How do you select the 2nd select value from the dropdown (selectByIndex)
  15. How do you do parameterization in testNG.
  16. Give an example for dataprovider.
  17. some questions on Object class (can it have array type? why? etc)
  18. How did you do parameterization in your framework
  19. Why specifically JXL? whynot APACHE POI.
  20. What is the difference between jxl and apache poi.
  21. 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).
  22. What type of reports you generate.
  23. What are the ways in you can create your own customized html report (Ans: XML to HTML / directly in notepad)
  24. Can you design a framework on your own and what would be your considerations ?
  25. Comparing 2.45.0 jar and 2.46.0 jar what are the advanced features in 2.46.0?
  26. 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?
  27. How will you verify the colour of the heading in a webpage is as expected (colour)?
  28. There are multiple frames in a webpage. Say three frames one within another, how will you find an element in the inner most frame?
  29. What is WebElement? Is it interface or class? explain?
  30. What is compile time and Run time polymorphism?
  31. One Element is not identifiable in a webpage. Why it is not identifiable in a webpage? (Note: It is not an Alert)
  32. Where will you have your locators in your framework?
  33. How will you pass data without using 'Sendkeys' method?
  34. What are the methods available in an 'Alert'?
  35. How will you click on a button without using 'Click' method? [Keys.ENTER not expected]
  36. Difference between Interface and Abstract Class?
  37. Load a browser and go to google page
  38. I have 100 test cases with me. How will you estimate?
  39. How many Scripts you will automate per day ? How many Simple, Medium, Complex test cases?
  40. Why do you need a framework? what is the use?
  41. Have you used Java Executor?
  42. Have you created Abstract class in your project?
  43. "driver.findElement(By.id)" - What is driver here? What is 'By' here?
  44. What is the IDE you are using? How will you get the Jar files in it?
  45. How will you read data from an Excel? write code and explain?
  46. What is the folder structure of your framework? Explain?
  47. How will you get all the links in a webtable?
  48. Explain all the oops concept with real-time example
  49. Write a sample script in selenium for login pages with all coding standards
  50. Consider you have 200 test cases and it will take 4 hours to complete. After run 100 test cases got failed, so how do you rerun only the failed test cases ?
  51. If you want to rerun the test exactly after the failure you need to call the method that failed. You can get that method name from ITestResult object.
  52. If you want to rerun all the failed test cases together, then you can give the testng-failed.xml as input xml after the first execution
  53. Can you design a framework from scratch?
  54. Given an application with 100-200 teat cases and it is stable, what all would you consider for designing a framework and how would you start.
  55. Explain your framework structure
  56. How will you initiate your reports? (I told him about one line that we use to initialize extent reports). Is this one line enough to initiate the reports?
  57. Draw a block diagram of how tour framework looks like. (He then said no need as I was again going like framework folder structure)
  58. How are your data sheets? In excel or any other format?
  59. I have an excel data sheet with certain number of rows and columns. Can you write a code to read data from that and store it into any collection? (I used Array List)
  60. Why do you use list here? Why not anything else? Why not hash map?
  61. If there are two elements in a Web page (they have unique identifiers for themselves), one of them is underlined and other one is not. How will you identify the one that is underlined.
  62. If i have a Web page, when I click on a link in d Web page, another page opens in a new window. Inside that window there is a frame that has another frame within it. Tell me the steps to get the text of an element inside the second frame (starting from first window)
  63. What if I have to close the second window?
  64. What Is the difference between quit and close?
  65. If I have any manually opened browsers, will quit close them?
  66. Do you know the evolution of selenium? From selenium RC? Do you know selenium RC backed webdriver concepts?
  67. Why do you use maven? Have you worked with continuous integration?
  68. When you give dependencies in the POM.xml, will maven check for the desired dependencies with your local system or with the Internet?
  69. What is POM? (Page Object Model). What is the difference between POM and the normal project models?
  70. I have a home page, search page and results page. Do I need to create objects for each page to access the elements of the page?
  71. If I'm not creating object for the search page how will I be able to access the elements of that page?
  72. If my home page is not available, will I be able to move to the further pages?
  73. What are the exceptions that you have come across?
  74. How do you handle those exceptions?
  75. Suppose in a page, when I click on a link, an alert might appear asking it to wait... Or it may not appear in some cases. How will you handle this situation?
  76. Reverse the string Cognizant without using reverse Method()
  77. Cognizant
  78. Find the length of the String (length)
  79. Loop from length - 1 to 0 (for length-1 0)
  80. Get the character of the position - one at a time: right -> left (charAt(i)
  81. Concentate the character (+ / concat)
  82. Print
  83. Find out the most repeating character in the string Cognizant
  84. Find out the least repeating character in the string Cognizant
  85. Print diamond in the console
  86. Find the position of 2nd last character 'C' in the string "Congizant India Deveopement Centre"
  87. Write a java program to replace aeiou (with 1,2,3,4,5) in the given string "Photon Info Tech"
  88. Tell me about the framework used in your project
  89. How to read data from excel ?
  90. how to handle multiple windows ?
  91. TestNG annotations and arrange their structure
  92. how to ignore test cases?
  93. whether interface can have constructor ? Explanation reqd
  94. how to access private data members from outside the class ?
  95. difference between hashmap and table ?
  96. The interviewer asked how strong in Selenium and Java to rate myself from 0(Least) to 5(Strong), i answered Selenium as 4 and Java as 2.5/3.
  97. difference between findelements and findelement ? What is the error occurs if the locator is missing on both will it give error / null / exception for both
  98. Difference between Array list and linked list?
  99. What is Maven?, how we use maven in Eclipse and where, What is the syntax in pom.xml? they are expecting the exact tag names in pom.xml..
  100. What is TestNg how we integrate TestNG with selenium and how it is linked in POM.xml everytime?
  101. they given web table like below and asked the Xpath relationship between them,
  102. "in the above code tell me what is the relationship between 1st <td> with <tr>, what is the relationship between 1st <td> with <tbody> and
  103. "7) why Array list is faster then Linked list? since both are locating the Index what is the difference?only these 7 questions they asked me....
  104. What is Page object model project structure? and benefits over other frameworks?
  105. what is TestNG and give the annotations in order and parameters passed in order? he asked me 2 more questions related to TesTNG to me such as
  106. What is the parameter to be used to execute the testcases repeatedly, and for threadcount, thread pool size, max instance etc?
  107. difference between depends on group and depends on method?
  108. difference between priority and depends on methods with e.g
  109. if we give parameter as both priority=0 AND dependsonmethod=method1which will be executed 1st?
  110. given as scenario such as the web page with personal information and a submit button given
  111. "Click on the submit button -> opens the new webpage in that we will see a button ""Sign in"" and once clicked the username and password label
  112. in Xpath if there is no locators and no names or values present....write your own relative Xpath ?
  113. interviewer wrote Testng annotations in a paper and asked me the order it works
  114. If @ Test us removed what is the exception we get
  115. what is POM in maven what is snapshot in pom.
  116. difference between find element and elements
  117. how to get the value of the underlined text inside the frame
  118. do you know about maven and Jenkins? Why we use maven
  119. write a code to read data from excel using dataprovider
  120. what is setting .XML in maven
  121. how does testng works with maven group id and version in pom
  122. what is artifact id
  123. Tech round 1
  124. Tell about ur prj
  125. Java - Qns related to static, final, abstract, interface , exception handling
  126. Selenium - frame handling, window handling, excel read write
  127. How you implemented automation in your project?
  128. Explain your framework in detail
  129. What difficulties faced and how you overcame them
  130. How u did reporting of results
  131. Very general questions like tell about yourself, why you want to quit your current company, why you want to join CTS etc
  132. On the whole, nothing was asked outside of what we learnt in these 2 months 😊
  133. What is Implicitwait and explicit wait?
  134. Asked to write code to launch google page
  135. Asked to write syntax for relativeXpath
  136. Asked to write xpath for visibletext
  137. How to achieve DataDrivenFramework ?
  138. What is POM?
  139. What is TestNG ?
  140. Difference between @BeforeTest and @BeforeMethod
  141. What is collection? List and Set
  142. DesiredCapabilities
  143. There are 100 rows (i.e. <tr> tags) and each row has three test data ( <td> id</td>
  144. Here 20 rows have duplicate values for name value. How do you check it?
  145. Difference between List and Set
  146. Interface
  147. Difference between Abstract Class and Interface
  148. Why multiple inheritance not achieved by class?
  149. Explain about your framework
  150. Group execution
  151. Explain about framework
  152. How datadriven is achieved?
  153. What is class and package?
  154. list few packages which you have used in selenium
  155. What is class and object?
  156. Can static varibles /methods be overrid?
  157. few questions on my project
  158. Tell abt yourself!!
  159. Rate yourself in Java and selenium out of 5
  160. tell abt your project architecture
  161. Design pattern of your project for a login page.
  162. Write a wrapper Method for Click function which should work for both string and a web element
  163. What is object repository
  164. Suppose a list of 10 data with a common id=xyz, get text of all the web elements and print it.
  165. continuation of above, I want only the 5th element and check whether it is String or not
  166. What are different locators you have used in your project?
  167. what is the relative xpath? And how many types of xpaths are there??
  168. What is annotation in testng
  169. how many annotations are there in testng
  170. if in a class extends super class there are four methods suppose
  171. And in super class
  172. What will be the output of the above
  173. what is grid and tell the implementation
  174. how Jenkins will be useful
  175. Explain keyword driven model?
  176. what is maven? How you have implemented in ur project?
  177. in testng how XML works??
  178. how u ll run a suite level in XML?
  179. what is an exception??
  180. What will happen in the above code??
  181. what will happen if webelement not found in the above code?
  182. when the exception will come in the above code? And when else block will be executed?
  183. what are the exceptions you faced in project? And try catch
  184. what is soap ui and service testing
  185. Where you executed SQL in ur project
  186. what is function overloading and function overriding
  187. what kind of role you want, coming executing two three test cases and going home or taking up new challenges and completing them??
  188. do you know abt mobile automation?
  189. Give brief intro abt yourself??
  190. how you have implemented your project in testng annotations!!
  191. tell me how you have implemented maven projects and importance?
  192. tell me abt Jenkins and implementation
  193. tell abt wrapper classes and page object model how you implemented in methods
  194. how you ll implement testng in the page object model
  195. where reports will store in pom
  196. What is soap ui tool and soap ui pro tool?
  197. tell me the implementation of the hub and node in grid, why we should go for the grid.
  198. Do you know abt mobile automation??
  199. Why you wanted to switch the company??
  200. Experience and relevant Experience?
  201. And package discussion!!
  202. Tell me about yourself. Relevant automation experience.
  203. Have you used IDE? What is ide? What is the use of ide.
  204. Can you run your complete suite in ide.
  205. Can you use chrome driver reference directly in your script ? Will it work? - this I answered how we used to do at test leaf. But said like we need to add chrome server reference something I was not sure.
  206. What is Maven.why maven?
  207. structure of Pom.xml
  208. In Pom.xml I want to parameterize version how do you do that?
  209. What is sure-fire? Why do we need it?
  210. POM model?
  211. Constructors. Why do we need constructors? What's the use of it?
  212. List a few webdriver constructors?
  213. Constructors with parameters?
  214. About Jenkins
  215. Overloading, overriding
  216. There are 3 environments. Each has a text box with differen label names to enter, but all locators and properties are same for all three. How to give input correctly for each text box and when you get an exception how to handle - code and show with try catch
  217. TestNg xml is in one ip address. I want run in other 3 different machines with different ips how?
  218. Tell some exceptions that you have faced.
  219. What is staleElementException
  220. Static and final
  221. For final he asked to write code and asked me the out our when I change the final value and what exception will it throw?
  222. some more have and selenium on the go while answering.
  223. Round:2
  224. Windows, pop ups
  225. upload file
  226. POM model
  227. if locators keep changing how do you mange?
  228. some array related questions.
  229. challenges faced
  230. their current project challenge and if I have a solution
  231. about object. Properties
  232. About git
  233. About agile model
  234. Use of get and set method in java
  235. What is hash table
  236. What is hash set
  237. How to connect to db write code
  238. How to get a unique id from the string "id:9864 ".say multiple ways
  239. What is interface
  240. What is inheritance
  241. What is abstract class
  242. How to insert a data into an array
  243. How to move to the tag which has no attributes.write 2 ways
  244. What is the framework used in your project
  245. What are the different annotation used in TestNG.explain in detail
  246. Explain the usage of Jenkins
  247. How to move to the second value in dropdown without using any of the select command and click.
  248. If the default select is in the last value of the dropdown and then how to use the action class.
  249. Write code for the below scenario
  250. In the first page on click of ok button it navigates to a frame and it is not an window .on that we have to select the first radio button and click next .this opens up another frame with same properties.do the same process again and after that it moves the next window on clicking next.
  251. Difference between throws and throw.
  252. How to use regular expression
  253. How to connect to excel
  254. what is Grid and explain in detail. How you used in your project.
  255. 1. what is the difference between selenium and qtp
  256. what you meant by implicit wait
  257. How many waits are there in selenium
  258. what is the difference between implicit wait and explicit wait
  259. how will you find elements
  260. write line of code for elements
  261. In web page there is a element you dont know whether it appears or not. now how you'll find that element also you have to catch that exception. explain ?
  262. what does data driven testing means
  263. Do you aware of jdbc
  264. how you'll connect to jdbc explain
  265. If excel is input how will you connect to excel
  266. explain about POM
  267. is POM better or data driven better
  268. what is hybrid framewrok
  269. project structure
  270. what unit testing frame do you know
  271. how you will write assert statement for comparing the difference between actual and expected login name
  272. Difference between JUnit and TestNG
  273. What is SQL
  274. what do you know in Oracle(Since i said SQL: Structured query language and I know about Oracle since it is subject in college so i learnt that)
  275. How many joins that you are aware of.
  276. write select query, insert query.
  277. what is constructor.
  278. what is interface.
  279. what is abstract class.
  280. difference between both
  281. Explain about method overloading, method overridding concepts.
  282. What is STLC
  283. write the life cycles of STLC
  284. Scenario:
  285. Do u have any agile knowledge
  286. What is release backlog
  287. What should be dicussed in daily meeting
  288. Tell about yourself
  289. Why cognizant
  290. Framework used
  291. Draw pom structure and explain
  292. Polymorphism program
  293. Overloading and overriding
  294. Hash map and hash table
  295. Vector and array list
  296. Implicit wait and explicit wait
  297. Regression testing and retesting
  298. Smoke testing and sanity testing
  299. Project explanation
  300. Agile
  301. No of user stories per sprint
  302. Complexity of user story
  303. Sprint duration
  304. Agile and waterfall
  305. Defect tracking
  306. Team size
  307. Client interaction
  308. What is selenium
  309. Consider a web table having employee name and testing domain(manual or automation). Store these values . Then selected dropdown only if domain is automation ( write code)
  310. Tell about current project
  311. What are the challenges faced
  312. What is the framework currently working and others few questions
  313. ROUND 2:
  314. Right click
  315. Implicitly wait & explicitly wait
  316. Fluently wait
  317. Read from excel
  318. Firefox profile
  319. How will you handle proxy
  320. Have you worked in creating a framework from scratch ?
  321. What are the frameworks you worked on other than testNG and POM
  322. Explain inheritance .and what is the use of extends ,when we can use the methods of other class by creating an object itself ..
  323. How do you find broken links in a page and code for that
  324. how to find the count of all links in a web page
  325. , a web element was removed in the previous release and now you need to verify whether the element is present or not..how will u do this ?
  326. told to write xpath for a given example which uses following
  327. Questions asked in F2F:-
  328. Where you are currently working?
  329. Tell about yourself?
  330. How you shifted from manual to automated?
  331. Which methodology your project follows?
  332. What is Agile methodology?
  333. What are all phases in STLC?
  334. Which phases you actually works?
  335. Are you contributing in Test planning phase?
  336. About your organisation?
  337. About your designation?
  338. which defect management you are using?
  339. what are all the status in defect task?
  340. What status you will set if you want to assign a defect to developer?
  341. If defect still not fixed, who will have authority to move to next iteration?
  342. In that case, which status you will set?
  343. how you will get requirement
  344. how you will anaylse the requirement
  345. Rate yourself in Java?
  346. What are all the features in Java?
  347. What are all the java features you are using in selenium?
  348. Explain inheritance?
  349. Explain Encapsulation?
  350. Explain Overloading and overridding?
  351. Explain polymorphism?
  352. Explain abstract?
  353. Explain interface?
  354. Rate yourself in Selenium?
  355. What are all the annotations in TestNG?
  356. Explain your framework?
  357. Explain Hybrid framework?
  358. What reports you are using to verify the results
  359. How to read from Excel
  360. what repository you are using for handling files&folders
  361. If GIT, How you will add files to cloud
  362. what situation that your files were not added but the coding is correct
  363. when you will use Grid
  364. who will the hub in your projects
  365. whats the use of Grid
  366. when you will run regression
  367. what is verification and validation
  368. how you will verify the title
  369. what is assert and verify
  370. Rate yourself in SQL
  371. How you will connect to the DB
  372. write a query to fetch the data
  373. one Webpage contains title,dropdown,submit button and alert. Write a code to verify title,select 3rd opion in dropdown, click submit and once alert pops click ok.
  374. How to locate an element that has no locators.
  375. Types of Xpath
  376. Which is faster way of locating element
  377. Which works faster between Absolute and Relative Xpath
  378. What is disadvantage we have in Absolute xpath
  379. What is MAven
  380. Explain Maven life cycle
  381. Methods in Alert
  382. How to handle alert with Yes and No option
  383. How to interact with web table
  384. On clicking date field two month Calendar will be displayed (July and August) at a same time and date 4 will be enabled at this time and how will you handle this situation
  385. Wait method in selenium
  386. Syntax for fluent wait and one exact example applicable for this wait method
  387. Parallel execution through TestNG
  388. Explain about your project framework( I have explained about cucumber framework)
  389. write code for text box, combo box & input using xpath. (for input and combo box is available in web table).
  390. Roles and responsibilities in automation
  391. Data driven framework
  392. Explain page object model with description.
  393. null pointer exception
  394. wait methods which is support by WebDriver.
  395. fluent wait and it's syntax
  396. java default class (abstract class).
  397. db connection
  398. Git commands to push the code?
  399. Array List Vs List explenation with code
  400. dynamic web elememts handling ( X path and some X path examples need to write)
  401. frames handling code and inline frame handling ?
  402. SQL, JDBC connection for connection establishment code.
  403. How to handle a dynamic webtable
  404. what does @Test will do?
  405. How to take a Screenshort with code
  406. How to underline an element
  407. Selenium code to highlight text, and get colour and back ground colour.
  408. how to handle windows pop up ... Code using robot class.
  409. how u achieved cross browser testing ?
  410. code to get the tomorrow's date as mentioned format (dd-mm-yyyy)
  411. javascript executor code to click element
  412. difference bitween ant and maven
  413. when to use Excel as input and CSV ? Why u have used ????
  414. webservices basics questions…
  415. Invocation count and thread pool size in test ng?
  416. enumaration, iterator and list iterator difference
  417. random string generation and number generation.
  418. code to get the number of check boxes ?
  419. css selecors types
  420. String, stringbuilder and string buffer difference
  421. multuple inheritance in interface example code
  422. There are 1000 testcases in a test suite which has defect leakage. What strategy u wil come up for the solution
  423. What are the scenarios can be used to test Microsoft excel using selenium test scripts
  424. Write code to validate/compare web page data and excel data
  425. How do u do effort estimation
  426. Which version control tool u r using. Tell me the process what u do
  427. whether client agreed for extent reports?
  428. Have u been to scrum meetings. what u discuss in the meeting?
  429. Any innovation things done in selenium?
  430. Why you are using excel to fetch test data, it will take too much time and will create performance issue.
  431. Have u worked on test plan and test strategy
  432. How will you generate the failed testcase?
  433. How will you get only the failed testcase screenshot?
  434. first time button is enabled after some time button should be disabled,how will you verify it
  435. how will you retrieve the values in hashmap
  436. How will you do Right click on the mouse
  437. How will you verify the highlight element
  438. I told JavaScript concept he asked other than that any think u have used he told it too have some drawback?
  439. how to check the hidden element
  440. whether u have anyidea database connection
  441. Need to execute four different test environment ,how u will do it maven
  442. What is the difference bitween assert and verify
  443. Explain BDD frame work
  444. how to establish database connection
  445. Expalin different xpaths and types
  446. few scenario based questions
  447. Read and write the data from excel sheeet
  448. Why is cucumber preferred
  449. What Exceptions u faced in cucumber
  450. What are the Keywords used in cucumber
  451. How to Handling alerts and hot to take screenshot of an alert
  452. What type of reporting tool ur using in ur office and write a code for that
  453. Use of Jenkins and how to schedule it
  454. Write the Java code to check prime no
  455. Some questions on git hub, SQL query to fetch employee with highest salary
  456. Types of annotations and questions related to annotation and attributes. Some scenario based questions
  457. About project domain and application i am working on with framework implementation.
  458. Why ur creating maven project and the use of maven project
  459. How Jenkins is used in ur office
  460. More questions on cucumber framework, mandatory keyword
  461. How do I convince customer on the selection of Automation tool
  462. Difference between pull and fetch command used in git.
  463. What is wait, which is most prefered wait
  464. What is page object model, what is the reason to prefer page object model
  465. Diff between is displayed & is enabled
  466. Write the Drag and drop code
  467. Rate ur self in sql
  468. How to do sorting using SQL query
  469. Cross browser testing
  470. dB connectivity code for DB2...
  471. Day to day responsibilities in your office
  472. what are the challenges u faced in Selenium..how to classify cases which can be automated or not
  473. Asked about why move to manual to automation
  474. Write xpath ..I have explained and written for relative xpath and again asked for absolute xpath for IRCTC login..
  475. Some questions in Jenkins and GitHub.
  476. Ur Roles & responsibility in ur project
  477. What kind of test cases will u automate
  478. How many test cases u will execute in a day
  479. How do we merge code when conflict occurs in Git
  480. Apart from java what languages can be used in Jenkins tools
  481. Why can't use code directly in Jenkins without using maven and Github
  482. Scenario based questions + team management
  483. client needs automation for the application and if you are going to meet client and explain how to achieve and brief abt plan to the client.
  484. you are working in Sprint2 but if you receive issues from client in Sprint 1 then how to handle

Back to Company Wise Interview Questions