Company-wise Selenium and QA interview preparation page.
Questions
What is the framework you are using?
Can you explain the framework functionality? deep dive..
Your role in your automation team.
Do you know Robot framework?
Explain TestNG XML structure.
How do you connect to a database in java
What are the different ways your database url can be ? apart from http://
Is it mandate to close statment object in DB code ?
Write code for db connection and walkthrough the code.
Can you explain about List Interface.
Usage of List interface (explained with select class).
Can you impose selectByVisibleText / selectByIndex methods on list interface reference created (continuation to above).
Without those methods how do you select the dropdown values
How do you select the 2nd select value from the dropdown (selectByIndex)
How do you do parameterization in testNG.
Give an example for dataprovider.
some questions on Object class (can it have array type? why? etc)
How did you do parameterization in your framework
Why specifically JXL? whynot APACHE POI.
What is the difference between jxl and apache poi.
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).
What type of reports you generate.
What are the ways in you can create your own customized html report (Ans: XML to HTML / directly in notepad)
Can you design a framework on your own and what would be your considerations ?
Comparing 2.45.0 jar and 2.46.0 jar what are the advanced features in 2.46.0?
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?
How will you verify the colour of the heading in a webpage is as expected (colour)?
There are multiple frames in a webpage. Say three frames one within another, how will you find an element in the inner most frame?
What is WebElement? Is it interface or class? explain?
What is compile time and Run time polymorphism?
One Element is not identifiable in a webpage. Why it is not identifiable in a webpage? (Note: It is not an Alert)
Where will you have your locators in your framework?
How will you pass data without using 'Sendkeys' method?
What are the methods available in an 'Alert'?
How will you click on a button without using 'Click' method? [Keys.ENTER not expected]
Difference between Interface and Abstract Class?
Load a browser and go to google page
I have 100 test cases with me. How will you estimate?
How many Scripts you will automate per day ? How many Simple, Medium, Complex test cases?
Why do you need a framework? what is the use?
Have you used Java Executor?
Have you created Abstract class in your project?
"driver.findElement(By.id)" - What is driver here? What is 'By' here?
What is the IDE you are using? How will you get the Jar files in it?
How will you read data from an Excel? write code and explain?
What is the folder structure of your framework? Explain?
How will you get all the links in a webtable?
Explain all the oops concept with real-time example
Write a sample script in selenium for login pages with all coding standards
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 ?
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.
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
Can you design a framework from scratch?
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.
Explain your framework structure
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?
Draw a block diagram of how tour framework looks like. (He then said no need as I was again going like framework folder structure)
How are your data sheets? In excel or any other format?
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)
Why do you use list here? Why not anything else? Why not hash map?
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.
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)
What if I have to close the second window?
What Is the difference between quit and close?
If I have any manually opened browsers, will quit close them?
Do you know the evolution of selenium? From selenium RC? Do you know selenium RC backed webdriver concepts?
Why do you use maven? Have you worked with continuous integration?
When you give dependencies in the POM.xml, will maven check for the desired dependencies with your local system or with the Internet?
What is POM? (Page Object Model). What is the difference between POM and the normal project models?
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?
If I'm not creating object for the search page how will I be able to access the elements of that page?
If my home page is not available, will I be able to move to the further pages?
What are the exceptions that you have come across?
How do you handle those exceptions?
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?
Reverse the string Cognizant without using reverse Method()
Cognizant
Find the length of the String (length)
Loop from length - 1 to 0 (for length-1 0)
Get the character of the position - one at a time: right -> left (charAt(i)
Concentate the character (+ / concat)
Print
Find out the most repeating character in the string Cognizant
Find out the least repeating character in the string Cognizant
Print diamond in the console
Find the position of 2nd last character 'C' in the string "Congizant India Deveopement Centre"
Write a java program to replace aeiou (with 1,2,3,4,5) in the given string "Photon Info Tech"
Tell me about the framework used in your project
How to read data from excel ?
how to handle multiple windows ?
TestNG annotations and arrange their structure
how to ignore test cases?
whether interface can have constructor ? Explanation reqd
how to access private data members from outside the class ?
difference between hashmap and table ?
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.
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
Difference between Array list and linked list?
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..
What is TestNg how we integrate TestNG with selenium and how it is linked in POM.xml everytime?
they given web table like below and asked the Xpath relationship between them,
"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
"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....
What is Page object model project structure? and benefits over other frameworks?
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
What is the parameter to be used to execute the testcases repeatedly, and for threadcount, thread pool size, max instance etc?
difference between depends on group and depends on method?
difference between priority and depends on methods with e.g
if we give parameter as both priority=0 AND dependsonmethod=method1which will be executed 1st?
given as scenario such as the web page with personal information and a submit button given
"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
in Xpath if there is no locators and no names or values present....write your own relative Xpath ?
interviewer wrote Testng annotations in a paper and asked me the order it works
If @ Test us removed what is the exception we get
what is POM in maven what is snapshot in pom.
difference between find element and elements
how to get the value of the underlined text inside the frame
do you know about maven and Jenkins? Why we use maven
write a code to read data from excel using dataprovider
what is setting .XML in maven
how does testng works with maven group id and version in pom
what is artifact id
Tech round 1
Tell about ur prj
Java - Qns related to static, final, abstract, interface , exception handling
Very general questions like tell about yourself, why you want to quit your current company, why you want to join CTS etc
On the whole, nothing was asked outside of what we learnt in these 2 months 😊
What is Implicitwait and explicit wait?
Asked to write code to launch google page
Asked to write syntax for relativeXpath
Asked to write xpath for visibletext
How to achieve DataDrivenFramework ?
What is POM?
What is TestNG ?
Difference between @BeforeTest and @BeforeMethod
What is collection? List and Set
DesiredCapabilities
There are 100 rows (i.e. <tr> tags) and each row has three test data ( <td> id</td>
Here 20 rows have duplicate values for name value. How do you check it?
Difference between List and Set
Interface
Difference between Abstract Class and Interface
Why multiple inheritance not achieved by class?
Explain about your framework
Group execution
Explain about framework
How datadriven is achieved?
What is class and package?
list few packages which you have used in selenium
What is class and object?
Can static varibles /methods be overrid?
few questions on my project
Tell abt yourself!!
Rate yourself in Java and selenium out of 5
tell abt your project architecture
Design pattern of your project for a login page.
Write a wrapper Method for Click function which should work for both string and a web element
What is object repository
Suppose a list of 10 data with a common id=xyz, get text of all the web elements and print it.
continuation of above, I want only the 5th element and check whether it is String or not
What are different locators you have used in your project?
what is the relative xpath? And how many types of xpaths are there??
What is annotation in testng
how many annotations are there in testng
if in a class extends super class there are four methods suppose
And in super class
What will be the output of the above
what is grid and tell the implementation
how Jenkins will be useful
Explain keyword driven model?
what is maven? How you have implemented in ur project?
in testng how XML works??
how u ll run a suite level in XML?
what is an exception??
What will happen in the above code??
what will happen if webelement not found in the above code?
when the exception will come in the above code? And when else block will be executed?
what are the exceptions you faced in project? And try catch
what is soap ui and service testing
Where you executed SQL in ur project
what is function overloading and function overriding
what kind of role you want, coming executing two three test cases and going home or taking up new challenges and completing them??
do you know abt mobile automation?
Give brief intro abt yourself??
how you have implemented your project in testng annotations!!
tell me how you have implemented maven projects and importance?
tell me abt Jenkins and implementation
tell abt wrapper classes and page object model how you implemented in methods
how you ll implement testng in the page object model
where reports will store in pom
What is soap ui tool and soap ui pro tool?
tell me the implementation of the hub and node in grid, why we should go for the grid.
Do you know abt mobile automation??
Why you wanted to switch the company??
Experience and relevant Experience?
And package discussion!!
Tell me about yourself. Relevant automation experience.
Have you used IDE? What is ide? What is the use of ide.
Can you run your complete suite in ide.
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.
What is Maven.why maven?
structure of Pom.xml
In Pom.xml I want to parameterize version how do you do that?
What is sure-fire? Why do we need it?
POM model?
Constructors. Why do we need constructors? What's the use of it?
List a few webdriver constructors?
Constructors with parameters?
About Jenkins
Overloading, overriding
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
TestNg xml is in one ip address. I want run in other 3 different machines with different ips how?
Tell some exceptions that you have faced.
What is staleElementException
Static and final
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?
some more have and selenium on the go while answering.
Round:2
Windows, pop ups
upload file
POM model
if locators keep changing how do you mange?
some array related questions.
challenges faced
their current project challenge and if I have a solution
about object. Properties
About git
About agile model
Use of get and set method in java
What is hash table
What is hash set
How to connect to db write code
How to get a unique id from the string "id:9864 ".say multiple ways
What is interface
What is inheritance
What is abstract class
How to insert a data into an array
How to move to the tag which has no attributes.write 2 ways
What is the framework used in your project
What are the different annotation used in TestNG.explain in detail
Explain the usage of Jenkins
How to move to the second value in dropdown without using any of the select command and click.
If the default select is in the last value of the dropdown and then how to use the action class.
Write code for the below scenario
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.
Difference between throws and throw.
How to use regular expression
How to connect to excel
what is Grid and explain in detail. How you used in your project.
1. what is the difference between selenium and qtp
what you meant by implicit wait
How many waits are there in selenium
what is the difference between implicit wait and explicit wait
how will you find elements
write line of code for elements
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 ?
what does data driven testing means
Do you aware of jdbc
how you'll connect to jdbc explain
If excel is input how will you connect to excel
explain about POM
is POM better or data driven better
what is hybrid framewrok
project structure
what unit testing frame do you know
how you will write assert statement for comparing the difference between actual and expected login name
Difference between JUnit and TestNG
What is SQL
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)
How many joins that you are aware of.
write select query, insert query.
what is constructor.
what is interface.
what is abstract class.
difference between both
Explain about method overloading, method overridding concepts.
What is STLC
write the life cycles of STLC
Scenario:
Do u have any agile knowledge
What is release backlog
What should be dicussed in daily meeting
Tell about yourself
Why cognizant
Framework used
Draw pom structure and explain
Polymorphism program
Overloading and overriding
Hash map and hash table
Vector and array list
Implicit wait and explicit wait
Regression testing and retesting
Smoke testing and sanity testing
Project explanation
Agile
No of user stories per sprint
Complexity of user story
Sprint duration
Agile and waterfall
Defect tracking
Team size
Client interaction
What is selenium
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)
Tell about current project
What are the challenges faced
What is the framework currently working and others few questions
ROUND 2:
Right click
Implicitly wait & explicitly wait
Fluently wait
Read from excel
Firefox profile
How will you handle proxy
Have you worked in creating a framework from scratch ?
What are the frameworks you worked on other than testNG and POM
Explain inheritance .and what is the use of extends ,when we can use the methods of other class by creating an object itself ..
How do you find broken links in a page and code for that
how to find the count of all links in a web page
, 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 ?
told to write xpath for a given example which uses following
Questions asked in F2F:-
Where you are currently working?
Tell about yourself?
How you shifted from manual to automated?
Which methodology your project follows?
What is Agile methodology?
What are all phases in STLC?
Which phases you actually works?
Are you contributing in Test planning phase?
About your organisation?
About your designation?
which defect management you are using?
what are all the status in defect task?
What status you will set if you want to assign a defect to developer?
If defect still not fixed, who will have authority to move to next iteration?
In that case, which status you will set?
how you will get requirement
how you will anaylse the requirement
Rate yourself in Java?
What are all the features in Java?
What are all the java features you are using in selenium?
Explain inheritance?
Explain Encapsulation?
Explain Overloading and overridding?
Explain polymorphism?
Explain abstract?
Explain interface?
Rate yourself in Selenium?
What are all the annotations in TestNG?
Explain your framework?
Explain Hybrid framework?
What reports you are using to verify the results
How to read from Excel
what repository you are using for handling files&folders
If GIT, How you will add files to cloud
what situation that your files were not added but the coding is correct
when you will use Grid
who will the hub in your projects
whats the use of Grid
when you will run regression
what is verification and validation
how you will verify the title
what is assert and verify
Rate yourself in SQL
How you will connect to the DB
write a query to fetch the data
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.
How to locate an element that has no locators.
Types of Xpath
Which is faster way of locating element
Which works faster between Absolute and Relative Xpath
What is disadvantage we have in Absolute xpath
What is MAven
Explain Maven life cycle
Methods in Alert
How to handle alert with Yes and No option
How to interact with web table
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
Wait method in selenium
Syntax for fluent wait and one exact example applicable for this wait method
Parallel execution through TestNG
Explain about your project framework( I have explained about cucumber framework)
write code for text box, combo box & input using xpath. (for input and combo box is available in web table).
Roles and responsibilities in automation
Data driven framework
Explain page object model with description.
null pointer exception
wait methods which is support by WebDriver.
fluent wait and it's syntax
java default class (abstract class).
db connection
Git commands to push the code?
Array List Vs List explenation with code
dynamic web elememts handling ( X path and some X path examples need to write)
frames handling code and inline frame handling ?
SQL, JDBC connection for connection establishment code.
How to handle a dynamic webtable
what does @Test will do?
How to take a Screenshort with code
How to underline an element
Selenium code to highlight text, and get colour and back ground colour.
how to handle windows pop up ... Code using robot class.
how u achieved cross browser testing ?
code to get the tomorrow's date as mentioned format (dd-mm-yyyy)
javascript executor code to click element
difference bitween ant and maven
when to use Excel as input and CSV ? Why u have used ????
webservices basics questions…
Invocation count and thread pool size in test ng?
enumaration, iterator and list iterator difference
random string generation and number generation.
code to get the number of check boxes ?
css selecors types
String, stringbuilder and string buffer difference
multuple inheritance in interface example code
There are 1000 testcases in a test suite which has defect leakage. What strategy u wil come up for the solution
What are the scenarios can be used to test Microsoft excel using selenium test scripts
Write code to validate/compare web page data and excel data
How do u do effort estimation
Which version control tool u r using. Tell me the process what u do
whether client agreed for extent reports?
Have u been to scrum meetings. what u discuss in the meeting?
Any innovation things done in selenium?
Why you are using excel to fetch test data, it will take too much time and will create performance issue.
Have u worked on test plan and test strategy
How will you generate the failed testcase?
How will you get only the failed testcase screenshot?
first time button is enabled after some time button should be disabled,how will you verify it
how will you retrieve the values in hashmap
How will you do Right click on the mouse
How will you verify the highlight element
I told JavaScript concept he asked other than that any think u have used he told it too have some drawback?
how to check the hidden element
whether u have anyidea database connection
Need to execute four different test environment ,how u will do it maven
What is the difference bitween assert and verify
Explain BDD frame work
how to establish database connection
Expalin different xpaths and types
few scenario based questions
Read and write the data from excel sheeet
Why is cucumber preferred
What Exceptions u faced in cucumber
What are the Keywords used in cucumber
How to Handling alerts and hot to take screenshot of an alert
What type of reporting tool ur using in ur office and write a code for that
Use of Jenkins and how to schedule it
Write the Java code to check prime no
Some questions on git hub, SQL query to fetch employee with highest salary
Types of annotations and questions related to annotation and attributes. Some scenario based questions
About project domain and application i am working on with framework implementation.
Why ur creating maven project and the use of maven project
How Jenkins is used in ur office
More questions on cucumber framework, mandatory keyword
How do I convince customer on the selection of Automation tool
Difference between pull and fetch command used in git.
What is wait, which is most prefered wait
What is page object model, what is the reason to prefer page object model
Diff between is displayed & is enabled
Write the Drag and drop code
Rate ur self in sql
How to do sorting using SQL query
Cross browser testing
dB connectivity code for DB2...
Day to day responsibilities in your office
what are the challenges u faced in Selenium..how to classify cases which can be automated or not
Asked about why move to manual to automation
Write xpath ..I have explained and written for relative xpath and again asked for absolute xpath for IRCTC login..
Some questions in Jenkins and GitHub.
Ur Roles & responsibility in ur project
What kind of test cases will u automate
How many test cases u will execute in a day
How do we merge code when conflict occurs in Git
Apart from java what languages can be used in Jenkins tools
Why can't use code directly in Jenkins without using maven and Github
Scenario based questions + team management
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.
you are working in Sprint2 but if you receive issues from client in Sprint 1 then how to handle