HCL Interview Questions

Company-wise Selenium and QA interview preparation page.

Questions

  1. Explain the Framework you are using
  2. What is data driven framework
  3. Where the test data will be stored in the FW
  4. Components of Framework
  5. How to count the links available in the form
  6. Different types of locators. Which locator is your preference and why
  7. Syntax of Xpath and cssSelector
  8. In what format you are giving your report to client
  9. Conversion process of Testing report to XSLT
  10. Processor used in report
  11. How to handle Authentication window
  12. How to handle multiple window
  13. Challenges faced in your automation project and how you overcome those
  14. How to handle complex interaction - Action class
  15. What kind of Frame work using in your organization..?
  16. Explain about your framework architecure..?
  17. Where did you stored all kind of xpaths in your framework..?
  18. What is the HUB & Node..?
  19. How do you run your test using a framework..?
  20. Write the xpath..?
  21. How to handle alerts using web driver..?
  22. How to identify two fields(Radio button) in a page with same id..?
  23. How to write a xpaths for Dynamic web pages..? (like facebook status, Filpakarts)
  24. Junit - how do you used in projects..?
  25. How do you handle popup windows in your projects..?
  26. Why is Java platform/OS independent ?
  27. Have you used collections in your code ?
  28. What is the difference between Implicit and Explicit wait ?
  29. Write any sample code -- Fibonacci series ...
  30. Scenario --
  31. I have three unique buttons in my page.(Display names are different)
  32. The internal ID & Name changes on every page load.
  33. I need to click on each button in sequence.
  34. Write a prog to find the largest of 3 numbers
  35. Write a program to obtain the ipaddress from the user and chk if the ipaddress is valid or not
  36. Write a program to chk if u hav received mail from hcl using webtable
  37. Ur project architecture
  38. Diff between hashmap and hashtable
  39. What is serialization
  40. What is anonymous class
  41. How to create a immutable class
  42. Challenges faced in selenium
  43. How will u locate the dynamic objects in a webpage
  44. Prog to reverse a string
  45. Obtain the number of chars in a text file
  46. Read a property file
  47. How to handle ajax alerts and frames
  48. Write a java program, to swap without using 3rd variable?
  49. Write a Java program to read text from a file and display it.
  50. Write a Java program to get file name from the given string.
  51. Str = "C:\Programs\TextFile.txt"
  52. Write a sql sub query to join Employee(T1, T2, T3) and return the table 3 values
  53. Write a selenium script to print the table values? Table is like 3X3 table with values A, B, C, 1, 2, 3, 4, 5, 6.
  54. explain abt hybrid framework (data&keyword driven)
  55. did you involved in initial framework development for your client ?
  56. do you know Ruby?
  57. write a java program to check a sting is palindrome
  58. write a java program to check a no is prime ?
  59. what is the use of toCharArray method?
  60. diff be assert and verify?
  61. consider there are steps in a test case and your second steps fails, here which one you use ? (assert or verify
  62. tell me diff be smoke and sanity testing ? And which one will go depth ?
  63. what is exploratory testing ?
  64. do you have performance testing in your project ?
  65. what you do in performance testing ?
  66. explain about page object model
  67. explain about reporting in your project ?
  68. formats of your report ?
  69. how do you give report for test cases to your client ?
  70. draw complete architecture of your client project
  71. what development model you use in your client ?
  72. tel me about extentreport jar and it's functionalities. Is it rd party tool ?
  73. how do you rate yourself in selenium out of ?
  74. how many locators available in selenium ?
  75. what is most preferred locators ?
  76. tell me the list of web elements a web page can have
  77. what is synchronization ?
  78. what is the diff be implicit wait and explicit wait ?
  79. where do use explicit wait ?
  80. consider there are three links available in a web page with same Id, name, text and all. How do you click the second link without using xpath ?
  81. explain the frame work used in ur project.
  82. write code to read data from excel.
  83. what is use of POI.
  84. how many test scripts do you have in ur project.
  85. how many days will take to execute all the scripts.
  86. what are the challenges u faced in ur project when u executing Selenium scripts.
  87. write a program to given number is palindrome.
  88. write a program to write given number is Prime or not
  89. Java is what type of language.
  90. what is oops and tell me the main concepts in oops.
  91. how do you find multiple objects in a web page.
  92. diff between findelement and findelements.
  93. diff between trow and throws.
  94. tell me the types of exceptions, why and how we handle them.
  95. diff between checked and unchecked exceptions
  96. how you handle popups in windows based applicn.
  97. what is diff between close() and quit()
  98. some basic qns on Actions like click, right click, double click
  99. what is implicit wait and syntax for this, what are the time units types, can we give hours and days also for time units?
  100. explain the POM
  101. Explain about you frame work?
  102. Xpath – Parent, Sibling relation
  103. If m1, m2, m3, are the methods in your class and you have given m1, m2, m4 in your xml. Will it skip the methods m1 and m2 or it will throw an error?
  104. What is the most generic exception class in selenium
  105. Write a sample code for the webElements
  106. Check box
  107. Text box
  108. Drop down
  109. Alert
  110. Popup window
  111. Click at the corner of the button
  112. Click on the button without using click method
  113. Get the IP address of the local host and check whether it is a valid address
  114. Write a code for data provider.
  115. Explain data driven and hybrid driven framework
  116. Write code to read property file
  117. Write a code to read the text file and print the no. Of vowels in it
  118. Write a sample code for palindrome
  119. You are inspecting a (Tex t box) WebElement and it is pointing to div tag. Will you be able to enter a text when the tag is div
  120. Explain about your project folders
  121. Write a sample code for any of the testcase you have designed using a framework
  122. Difference between hashmap and hashtable with syntax
  123. How will you read a pdf file. What jar file is needed?
  124. GitHub commands. If 2 users are modifying the file in git hub and you want to know the changes and who had made it. What is the command to perform
  125. Maven – explain
  126. How will you schedule a job to run
  127. Will the hidden element (style = hidden) can be retrieved by coding?
  128. does hashmap accept duplicate values
  129. D/B hashmap and hashtable, arraylist & linked list and their methods
  130. wait() & sleep() in thread & questions on thread exceptions
  131. Program to convert a string to palindrome
  132. Maven & Jenkin - general question
  133. Difference between Jenkin & Windows task scheduler
  134. Xml path using following - sibling
  135. code to retrieve element from webtable and click its corresponding check box and verify If the link is enabled in that row. If the check box is clicked and click the link
  136. question on CSS
  137. how to retrieve value of an attribute of an element on xml path
  138. Abstract class, object class & its methods
  139. can a variable declared as private static final can be accesssed by other class in same package/different package
  140. rise of static keyword for variable, method
  141. abouth the report that we provide to customers in our project
  142. challenges faced in your project
  143. when do we use selenium grid
  144. Self introduction?
  145. Tell about your projects and Role and responsibilities?
  146. What are framework you have using in your project?
  147. Draw the framework architecture and explain the framework?
  148. Diff between findElement and findElements()?
  149. How will you navigate the pages using selenium?
  150. What is data driven framework? Explain poi.jar?
  151. Write sample selenium program with verifyEquals and assertEquals that you used in your projects?
  152. Diff between driver.findElement(By.id("")) and driver.findElementById("")
  153. How will you handle drop-down?
  154. In the mail inbox how will you find the email with attachement?
  155. Challenges faced in your automation project and how you overcome those?
  156. What is keyword driven framework?
  157. Selenium remote execution?
  158. What is Css Selector?
  159. Scenario -- I have three unique buttons in my page.(Display names are different). The internal ID & Name changes on every page load.I need to click on each button in sequence.
  160. How will you upload file in a web page using selenium?
  161. How to take screen shot using selenium?
  162. Do you know about Seleniunm RC?
  163. What is Test NG and annotations?
  164. What is XPath Axes?
  165. Java
  166. How would rate yourself in java out of 5.
  167. Write a java program to find number is prime or not?
  168. How do you achieve multiple inheritances in java.
  169. main() method can be overloaded?
  170. main() method can be overridden?
  171. Diff between list and set?
  172. What is Interface?
  173. What is abstract class?
  174. Diff between Interface and abstract class?
  175. What is Static?
  176. Diff between mutable and immutable? I explain with String and StringBuffer but they were not convinced.
  177. What is string buffer string and differences between them?
  178. Diff between Overloading and Overriding?
  179. Diff between throw and throws?
  180. final vs finally ?
  181. General
  182. What is Maven?
  183. How many bugs you found so far?
  184. How many testcases you written?
  185. How many minimum test cases you can write for a functionality? Eg. I am sitting the room near a table and i have to take a pen from the table?
  186. Explain Defect time cycle?
  187. Explain the C1 issue you have worked?
  188. Expected CTC?
  189. Notice Period?
  190. Why are you looking for a change?
  191. what is exception and error
  192. Difference between == and .equals
  193. What is command line arguments - customised behavior of main method
  194. diff b/w primitive and non-primitive data type
  195. what is testng and what is its use
  196. What is variable and types
  197. what is the main use of static
  198. How will you verify 100 link clicks at a time
  199. There are 12 buttons, they are month buttons. I have to verify and click the button
  200. Open a page, search for item and click the last item
  201. What are the method names for identifying x axis and y axis
  202. To identify dynamic webelement, which locator to use
  203. They read our resume word by word and ask qns from each line of it. So be prepared in usage of words in resume. Highlight the topics that you know very well.
  204. Other qns asked -
  205. Explain oops concepts with example
  206. Java pgm fr Floyd triangle
  207. Read and write data from excel - code
  208. Write down all possible scenarios - positive and negative for purchasing a mobile from flipkart - end to end
  209. Test ng annotations, data provider
  210. A person from a manager role interviewed me.. it was all about making him accept that you have real project experience in selenium.. need to explain the project in and out with pom framework , test ng and other related concepts.. 😊 all the best..
  211. Explain automation framework architecture in ur project using diagram.
  212. Can we have multiple object property files . At every instance of reading frm object property file
  213. u r doing read operation. I want to do only once not again n again..How will u do it.
  214. What drawbacks u faced in selenium, Where it doesnt wrk, wht ocasions u faced like this..how u handled it
  215. Write a code tht if a particular exception happens, the try block should run again
  216. A string "yyyyyHelloyyyy" is given.write code to print only Hello
  217. Difference between WebDriver driver = new WebDriver; and FirefoxDriver driver = new FirefoxDriver
  218. Bug Lifecycle
  219. "Google.com
  220. DesiredCapabilities for proxy to Firefox browser.
  221. Have you worked on Mac?
  222. Do you know what is component framework?
  223. Which framework do you use in your project and explain.
  224. What type of Reports do you use in project, not asking about TestNG reports.
  225. Find No. of mails present in the Inbox
  226. If a button is not getting clicked 2 out of 5 times, Is your script is failing or how do you handle it?
  227. "Ctrl"+"Alt"+"Delete" - Do this in a single line of Code
  228. How do you upload a file by clicking Browse button?
  229. How do traverse to a 3rd frame from 1st frame, Directly or how?
  230. How do you capture a text which is present inside a textbox
  231. What is the class used for Dropdown and what methods for selecting the options?
  232. Can you traverse reverse in X-path to div. Given Textbox with id present inside a span which is in-turn present inside div.
  233. Initialize and insert an item into a HashMap
  234. Difference between LinkedArray and ArrayList
  235. Difference between LinkedHashMap and HashMap
  236. Given 20 Students name. i) Remove the duplicate Names, ii) Sort them Alphabetically.
  237. There is a String like 123ABCD456. You need to store Integer and Char seperately.
  238. U have a webtable like below
  239. I need to get the Iphone price of 750
  240. Write code for Mouse over, drag and drop, Select Dropdown.
  241. How to scroll horizontally and vertically in a webpage. Code for it..
  242. Switching from one frame to another. Whether you should come out of first frame or can directly switch to other. Same scenario incase of nested frame.
  243. Swap two columns in a table..Write code
  244. Scenario: in Gmail login after entering username & pswrd - submit button vl b enabled. If submit is not enabled even after entering username,pswrd how can u handle this ?
  245. There will be two windows A and B, once you navigated to Window B from Window A by clicking some button; window A will be closed/expired. In window B if you click some button then window A will open again. Write java code for this..
  246. In a webpage will be 3 textboxes there, for textbox1 you have to pass some value, and in textbox2 some value will be there, the value present in textbox2 has to be copied to textbox3, and you have to click submit button. Write java code for this.
  247. In a webpage two table will be there, write a java program to swap data of two tables,
  248. What is the difference between absolute and relative xpath?
  249. Difference between throws and try catch?
  250. what are the different types of popups you came across in your project and how do you handle them?
  251. Name some exceptions thrown by java and selenium.
  252. How do you sort element in a linklist?
  253. Difference between linkedhashmap and treehashmap.
  254. Given a scenario where a webtable was given one of the rows was having a text field, how would you pass the value from excel to that text field write a code for it.
  255. Scenario- A particular element locators keeps on changing every other day how would you handle, write a method for it
  256. "Scenario- Have a page P1 if you click on a button it will navigate you to P2 and P1 will get close similar is the case with P2 i.e if you click on a button it will navigate to p1 but
  257. Scenario3- There are two web tables 2*2 each hw would you swap the the values of table one with table two so my output looks alike as shown below write a code for it.
  258. string s= new string("hcl"). how many object it will create
  259. what is array and list
  260. how do u connect ur Db with selenium
  261. swap numbers without using temp variable
  262. reverse the string without using string buffer method
  263. how many type of list
  264. how to give sample test data to ur test case
  265. what are the challenges u have faced in automation
  266. explain your day to day work
  267. explain ur project
  268. abstract class and interface difference
  269. which reporting tool u r using
  270. how to get report
  271. given one html code and asked me to write 2types of xpath
  272. how to automate the image eg. dynamically change image like graph
  273. do u have knowledge on autoit
  274. what is thread and how to create thread class
  275. write a selenium code for drop down by using index
  276. diff between get Windowshandle and getwindowhandles
  277. IS it possible to create a object for interface?
  278. how to take screenshot. write a code for that
  279. Explain ur framework
  280. Explain about test case execution flow ( from where it start to close the browser )
  281. write a code for password validation (first letter should be upper case, alpha numeric, spl character )
  282. how to get data from webtable (5th row 8th colum)
  283. diff between arraylist and linked list
  284. if there are 100 links how to click 5 th link while running first time of case, next time it should click 6th link
  285. aboyt ur current working project
  286. do u know any mob automation tool
  287. what is appium
  288. Xcel get data
  289. Interface and its example
  290. Abstract and its example
  291. This keyword example
  292. Super keyword example
  293. Handling Alerts
  294. Handling Windows...
  295. Explain about ur framework
  296. if there are 100 links how to click 5 th link while running first time of case, next time it should click 6th link 4)aboyt ur current working project
  297. reverse the string without using string buffer methods
  298. how many type of list 7) how to give sample test data to ur test case
  299. give one html code and ask me to write 2types of xpath
  300. how many years you are in automotion
  301. how to handle dynamic elements
  302. how do deal with radio button
  303. adv of pom
  304. what is keyword driven
  305. tell me the code of browser launch, passing url
  306. types of xpath
  307. testng annotations
  308. what is the use of testng. xml
  309. how to paas data to the test cases
  310. xcel sheet access
  311. same element present in more than one time means how to locate it
  312. how u r integrating pom with keyword driven
  313. what is record and play back? then why are writing scripts
  314. how to give priority and how to skip the testcased
  315. ex for inheritance . during inheritance how to access the object of class A in class B
  316. tell me the oops concept
  317. what are the challenges u have faced
  318. are u willing to learn new things
  319. are u flexible with timing
  320. How will you group the test cases based on smoke ans regression?
  321. What are the TestNg annotaions you have used in your project?
  322. write a code to find how many check boxes are checked and how many unchecked in a webtable where the row count is unknown. There will be many checkboxes in each rows. Should not use Xpath.
  323. Write a code to print the default value displayed in the dropdown using select class.
  324. write a method with 3 parameters (rowNum, colNum, StringValue) which should place a value in the user defined row and column in a new sheet.
  325. Explain about 'throw' keyword
  326. In the below code which catch block will get executed first,
  327. write the various xpaths you know
  328. How will you get the last row number in excel?
  329. Explain Page object model project folder structure and how you handle reports in that.
  330. Validate the List box value based on the another list box selection
  331. Direct window handling concepts
  332. Write xpath to select 2nd row, 5th column list box
  333. What are the actions that you can perform with Actions class
  334. Difference between window handling and frame. Will both r same?
  335. How can you check whether a field is available and enabled in a webpage
  336. Write a code to validate the List box values using HashMap
  337. Interface,
  338. Inheritance,
  339. Polymorphism,
  340. Final keyword in java,
  341. Difference B/w abstract class & interface,
  342. Collections,
  343. How to pass URL in java & verify response,
  344. Diff b/w set & list,
  345. Diff b/w explicit wait and implicit wait,
  346. Interface of WebDriver class,
  347. what WebDriver returning,
  348. TestNG annotations,
  349. How to pass parameters using TestNG,
  350. explain structure of testng xml,
  351. how to run script in parallel,
  352. How to run groups,
  353. Mevan build command,
  354. Diff b/w clean build and test in mevan,
  355. explain Mevan Pom xml,
  356. explain your project framework,
  357. explain POM framework,
  358. explain cucumber keywords,
  359. How to write script for specific scenario and how system wiĺl identifies those steps,
  360. Sql- Diff b/w inner join and left outter join,
  361. Select max record from table, write sql script,
  362. what is returning TestNG dataProvider,
  363. How to run specific class in testng,
  364. have u used continues integration,
  365. Advantages & disadvantages of appium,
  366. how to switch webview,
  367. how appium works,
  368. touch actions,
  369. unhandled exception and handled exceptions difference,
  370. What framework you use in your project.
  371. Various annotations in testng.
  372. A sample testng XML to run class 2 first and class 1 and 3 should be dependent on class 2.
  373. How you execute a method first out of 3 methods in a class.
  374. How you connect to a database. Write code.
  375. What is inner join. Write a sample query.
  376. How do u sort an arraylist.
  377. What is generics.
  378. Difference between abstract and interface class.
  379. What is xpath.
  380. Write an xpath for dynamically changing id like hcl1234,hcl2457,hcl6542.
  381. How do you add a dependency in maven project. Write the syntax
  382. Write a script to read the excel and print the cell values.
  383. What is Reflection and where do u use?
  384. What is Implicit and Explicit wait and write the syntax for it.
  385. What is the use of Debugger in Java?
  386. How to upload a file using windows file exporer pop up and explain the different ways in detail?
  387. how to handle multiple popups
  388. Write program to read excel value and search for particular value in the excel value in the excel and return the output
  389. write a program for get alist of value from drop down
  390. Different between single and double slash in xpath?

Back to Company Wise Interview Questions