Interview Questions QA

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 8

SELENIUM with JAVA interview questions

Automation:
1.What is xpath and it's types?
2.What is cross browser testing and parallel testing?
3.Challenges faced during selenium testing?
4.What is Actions class?
5.How to handle drop down in selenium?
6.How to handle multiple browser pop up?
7.How to handle multiple browser tabs in selenium?
8.How to perform upload file using selenium?
9.How to perform download file using selenium?
10.How to get all values of dropdown in selenium?
11.How to perform (control + a) through selenium?
12.How to shift between tabs of a same browser using selenium?
13.What is Robot class?
14.What is AutoIT?
15.What are the difference between get() and navigate()?
16.What are the difference between findElement() and findElements()?
17.What is difference between quit() and close()?
18.What are different locators used?
19.Difference between xpath and cssSelector?
20.Different approaches to click the submit button?
21.What is javascriptExecutor and when it is used?
22.Handling WebTable(static and dynamic) in selenium
23.What is POM? Advantage and its disadvantage?
24.What is maven? list its phases or life cycle?Command to run our project thro
maven?
25.Explain ur project folder structure? Or Explain ur frame work?
26.What is testng?
27.How to create and delete cookies?
28.What does getwindowhandles() and getwindowhandle() return? Or its differences?
29.Is it possible to use only perform() without build()? 30.What is perform() and
build()?
31.How to scroll the browser window?
32. Preceding sibling and following sibling of custom xpath?
33.What is test management tool used in ur project?
34.What is the build automation tool used in ur project?
35.How u will handle the SSL certification?
Or what is DesiredCapabilities?
36.How to verify 'Bangalore' present in dropdown box or not?
37.How to verify 'Bangalore' present in 4×4 webtable? And print the column and row
number of it is present?
38.How to fetch the data from particular row and column of excel?
39.List all maven plugins like surefire plugin etc
40.What is jenkins?And explain its use?
41.Explain the tags present in testng.xml file
42.What is TDD?
43.What is BDD? Explain cucumber framework?What is gherkins?
44.What is Listener?
45.What is DataProvider?
46.What is parameterization?
47.What is PageFactory?
48.What is apache POI API? Or how to read data from excel?
49.What is explicit and implicit waits?
50.What are the challenges faced in automation testing?
51.Write code for handling multiple browsers and switch to new windows?
52.What is webdriver?And why webdriver is used?
53.List some selenium exceptions
54.What is StaleElementReferenceException?When this occurs?And how to overcome such
exception?
55.How do you group the test cases? And why?
56.How to include or exclude test cases?
57.What is NullPointerException?When it occurs?
58.What is selenium grid?
59.Should have knowledge on all testng annotations.
60.How do you control the execution of your test cases/test classes?
61.Git and its commands
62.Maven commands to execute,debug,compile
63.What is the current version of maven used?
64.How to identify broken links?How you have done in your project?Write code or
tell approach.
65.Write a code to fetch the value 'Test' from excel sheet which might be present
in any cell in excel. Or check whether value 'Test' is present in excel or not.
66.How to pass values to textbox other than using sendKeys()?
67.How to click login button other than using click(), submit() and
JavascriptExecutor?
68.What is subversion?

How to generate reports if we don’t have permission to use any external package for
a report and we also can’t use html report generated by testng.

How to verify the dashboard graph from selenium

How to rerun failed test cases apart from the failed test report

How to add data in dynamic webtable

What are the recovery scenarios in your framework to handle error or issue at the
run time ?

* Automation point*

*These are the questions asked from Mindtree.*


Selenium grid
This keyword
Final keyword
Static keyword
Access modifiers
How will you type into text box without sendkeys
How to take screenshots
How to use listeners what is the benefit of using it.
How to call log4j into your classes
How many types of browsers available in webdriver
Can we run the parallel testing without TestNG
What is serialisation and Deserialization in Rest assured
What is spec builders
What are the packages you have used in Rest assured
Some basic questions of framework and oops implementation in it
Some basic questions on Cucumber

*Cognizant Interview Questions*

- Selenium + Java

- Abstraction & where it is used in your project ?


- Diff between Abstract class & interface ?
- What is static keyword in Java
- What method Overloading & Overriding ?
- wait & Implicit and explicit wait ? How to user thread.sleep(time 10000)
- How you handle drop down list ?
- Have you use action class and where it is used ?
- what Maven Architecture and explain pom.xml ?
- TestNG what are the annotations use ?
- BDD framework ?
- Explain cucumber framework ?
- What are locators in selenium ?
- Git Hub Commands ? version controlling
- Absolute and Relative Xpath ?
- What are the exceptions occurred while using selenium webdriver ?
- What are difference between throws and thrown ?
- How you handle exceptions ?
- How many times you can write catch block ?
- When finally block get executed ?
- What is difference between POST & PUT ?

Tell me about yourself.


Framework?
Can we declare many interfaces object class inside the interface class
Types of assertion.
What is difference between assert and verify.
How to pass text in Gmail field.
test-NG annotations.
J unit annotations.
Interface in java
Abstraction in java
What are the methods in test-NG.
Exceptions in automation.
SQL where clause, aggregation, group.
Integration testing.
Unit testing.
How will you double click on we element.
Difference between override and overloading.
What is super keyword in java.
What is git and use of it.
Difference between break and continue statement.
What will you do if after release of software the particular thing working fine but
in one day after release it is not working what action will you take on this?

*Cognizant* Interview Questions - 4th Feb 2021

1. Tell me about yourself


2. Project details
3. Current role
4. What is API?
5. Request method In Postman
6. How you cover end to end API Testing
7. Use of API
8. Why Selenium?
9. Banking domain
10. Retail, corporate, investment banking
11. Agile (Kansan)
12. SIT and Regression Testing
13. Use of it
14. Integration Test, smoke Testing, sanity testing in your project
15. Defect Lifecycle, SDLC,STLC
CTS interview questions:
Tell abt urself
End-to-end testing
Defect cycle
How to customize the complexity in testing
How to prioritise testcase
Exception handling types
Xpath types
Locators
Inheritance
Class nd interface difference
Abstract
Wait types
Framework using in project
Challenges faced recently in automation project
Why main method is static?
What is Run time polymorphism
Difference between list and set
Method overloading and overriding
Use of constructor
Difference between static and non static methods
How to write xpath of column 'b' value using column 'a' text
How to handle drag and drop
How to handle multiple windows
What are the TestNG annotations used
Which annotation used for parameterization
About Maven - clean build
Git workflow
What is Jenkins and how to setup it

*Cognizant and HSBC* *interview questions* :

1. Tell about yourself and explain about your framework


2) what is the difference between fileinputstream and fileoutpustream.
3) can u write the program for the propertiesfile how you are create in selenium.

4) please learn these programs too :


1) Write the code for duplicating a string by using hashmap
2) write a program to count number of words in a string by using hashmap
3) write a program for getting sample word which is in this order
Sample
Sampl
Samp
Sam
Sa
S
4) what is xpath ? What are xpath functions?
5) what are oops concepts?
6) what is the difference between data abstraction and encapsulation where you have
implemented in your project.
7) what are the components of your framework.
8) what is this and super keyword and difference.
9) what is javascriptexecutor and when it will be used.

*CTS interview questions-chennai.*

Tell abt urself


End-to-end testing
Defect cycle
How to customize the complexity in testing
How to prioritise testcase
Exception handling types
Xpath types
Locators
Inheritance
Class nd interface difference
Abstract
Wait types
Framework using in project
Challenges faced recently in automation project
CTS Interview questions:
Why main method is static?
What is Run time polymorphism
Difference between list and set
Method overloading and overriding
Use of constructor
Difference between static and non static methods
How to write xpath of column 'b' value using column 'a' text
How to handle drag and drop
How to handle multiple windows
What are the TestNG annotations used
Which annotation used for parameterization
About Maven - clean build
Git workflow
What is Jenkins and how to setup it

*Cognizant Interview Questions_16Feb2021*


------------------
- Abstraction & where it is used in your project ?
- Diff between Abstract class & interface ?
- What is static keyword in Java
- What method Overloading & Overriding ?
- wait & Implicite and explicite wait ? How to user thread.sleep(time 10000)
- How you handle drop down list ?
- Have you use action class and whr it is used ?
- what Maven Architecture and explain pom.xml ?
- TestNG what are the annotations use ?
- BDD framework ?
- Explain cucumber framework ?
- What are locators in selenium ?
- Git Hub Commands ? version controlling
- Absolute and Realtive Xpath ?
- What are the exceptions occured while using selenium webdriver ?
- What are difference btwn throws and thrown ?
- How you handle exceptions ?
- How many times you can write catch block ?
- When finally block get executed ?
- What is difference between POST & PUT ?
Manual:
1.What are test design techniques?Explain BVA and ECP with some example?
2.Explain STLC
3.Explain Bug Life Cycle
4.What is the difference between bug and defect?
5.What is severity and priority?
6.Explain SDLC
7.What are the differences between smoke and sanity testing?

Mindtree Interview Questions:


1. What is constructor?
2. Types of Constructor?
3. Int i = 5; what’s the value of ++i and i++ ?
4. Difference between Inheritance and Interface?
5. Launch gmail.com, click on create account, Does “Next” button is A Class or
Interface?
6. OOPS concepts in Automation Framework?
7. Different types of locators
8. Difference between Absolute and relative xpath
9. Write an xpath for username field located in gmail Create Account page
10. Explain Selenium Architecture
11. List out Selenium Exceptions and how to handle Stale Element Reference
Exception
12. How do you configure Reports in Framework?

HR Round:

1. Explain your previous project


2. What is short term and long term goal?
3. Difference between Test Plan and Test Strategy
4. What is Exploratory Testing ?
5. What is Risk based testing?
6. If the defect is found in UAT environment (found by Business team) and missed
out in QA environment, how do you handle this situation ?

*Nagarro - Below are the Questions are asked in my 3 rounds of technical


interview:*
-----------------------------------------------------------------------------------
---
1. What are the different types annotations used in TestNG? How to use the
@Beforesuite and @AfterSuite annotations in TestNG?
2. How do we achieve parallel execution in TestNG?
3. What are the different arguments are passed along with @Test annotation in
TestNG?
4. How do we include and exclude the groups in the TestNG xml file?
5. How to use the dataprovider in TestNG with an example?
6. How do u idenityfy the objects? In what scenarios these locators are
used? Ex: name, id, xpath, linktext, csslocator, Partial linktext
7. Difference between Datadriven and Hybrid Frame work?
Java:
----
1. What is Abstract class? Where we will use Abstract Class in java?
2. What is interface? Difference between Abstract class and interface?
3. Difference between normal methods and Abstract methods in Java?
4. Why we are using constructors in java?
5. Difference between overloading and overriding ?
6. Explain "static" keyword in java and it's usage?
7. Why multiple inheritance is not supported in java?
8. Difference between "extend" and "implement" in java?
9. Explain the access specifiers public, Private, protected and default in
java with their visibility and security?
10. What are the difference between primitive and derived data types?
11. Difference between final, finally and finalize method in java?
12. How do we handle the exceptions in java? and Exception hierarchy in
java?
13. Why we are using finally block in java?
14. Can we handle the exception with try and without catch block?
15. Write a java program for whether the given string is palindrome or not?
16. Difference between String constant and String non-constant pools?
17. Give the example for String immutable code?
18. Difference between "==" and "equals()" in String class?
19. How to compare the two strings in java?
20. How to sort the elements in the Array? Syntax of the Array?
21. What is Collections Framework in Java?
22. What are the difference between Array and ArrayList in java? Give the
examples for each?
23. What is Set in the Collections? How to move from element to another
element in the Set?
24. Usage of Iterator interface?

Sapient Interview Questions :


 java :
1) what is polymorphism?
2) Exception handling ?
3) Difference b/w throw and throws?
4) what is file in and File out ?
5) How to write the data for notepad ? write the code ?
6) What is abstract and interface with example ?
7) write a program fact using recursion ?
8) How will you handle multiple exceptions ?

Selenium :

1) explain selenium architecture?


2) write a xpath or make my trip application?
    write the xpath for Holiday and no need to change the existing xpath .By using
the same xpath you need to identify the hotels as well.
3) Explain selenium grid how to setup?
4) How are you maintaining the logs in your framework?
5) Explain framework how you design?

TestNG

1) How will you execute the dependency test cases ?


2) How will you execute the 3 test cases at time ?
3) difference b/w Data provider and parameters?
4) what is the difference b/w Before Test and Before method ? How will it work?
Give me an example ?
5) write the testng xml format ?

BBD:

1) What is BBD , why do people can prefer BBD nowadays ?


2)  in BBD why before and after using ? Give me an example ?

Manual Testing :

What is a test strategy ?


What is the test plan ? How will you create?
how will you follow the agile process in your company ?
What is estimation?

Jenkins :

how you will create the job and how it will execute ?

Emphasis interview questions;


Java
1)Difference b/w interface and abstract class?
2)Difference b/w throw and throws?
3)What is finally ?
4)What is method overloading and method overriding?
5)What is object class?
6)What is reflection?
7)Write a program a reverse string?
8)Given string mahesh234 , extract only number , write a logic ?
9)Given input in array { 248} , print only alternate number ?
10)What is set ,list , array,arraylist , hashMap ?

Selenium
1) explain framework structure?
2) explain oops concepts where you implemented?
3) different b/w pagefactory and pom?
4) in pom if you not intalised the pagefactory what exception we will get?
6) how you will handle image one place to another place?
7) how you will handle iframes?
8) you have multiples windows, close the child windows , how you come back parent
window?
9) how you will clear data with out using clear method?
10) how you will pass the value with out using send keys?
11) how you will take screenshots?
12) if you add standlone sever in project? When build the project standard sever
also update?

BBD:
1)Diffence b/w scenario outline and datatables?
2) What is hookes?
3) what is dryrun?
4) how you will handle miss implemented methods in stepdefiniaton?
5) what is stepdefiniaton?
6)in feature we can maintain more scenarios ?
7) in feature file we have common method ,how you can handle ,which keyword we can
use?

Testng;

1) How to execute the one test couples times?


2) how to execute the 10 test cases sequence order?
3) what is data provider?
4) you have two test case A and B , which one it Will execute first'?
5) while execute the test case if you not provide @Test annotation what will
happen?

Explain jenkins?
Explain maven build tool ?

Api

What is saop and rest api?


Whats is 200 in postman?
What is forbidden error?
What is 500 status code in postman ?
What is 401 status code?
What is 503 status code?

You might also like