Selenium Interview Questions
Selenium Interview Questions
1. Write a code to get the text available in 3rd window and move the control to 2nd window
and close it.
3. Count no. Of words and sentence in notepad and arrange them in ascending order.
F2F questions:
4444
Selenium grid is a testing tool to run our scripts on different machine against different browsers.
There are two main elements of selenium gird: hub and node.
Hub: is a central machine where we load our test scripts. It controls the network of test machines.
Selenium grid has only one hub and it is the master of the network. When tests with desired
capabilities are given to the hub, hub searches for available nodes which matches the given
configuration. If hub finds a match, it will run the test on that node, if not, it will return error.
Node: is test machines with which hub runs tests. Grid has many nodes registered to one hub.
6. If u have entered URL, but trying perform remaining code operation, which exception u will
get.
7. Listeners concept.
Listener in selenium means it listens what happened and do some actions before or after the
event. In selenium, we have a WebDriverEventListener interface, which has some predefined
methods that we need to implement in another class. We implement this interface to define what
the listener do before or after certain event, such as click, navigate or exceptions. In order to use
this listener class, we should use EventFiringWebDriver, which is a class that actually
firesWebDriver events. We just have to create an object of this class with driver object as an
argument. Then we can register an object of listener class to the object of EvenFiringWebDriver.
In This way, if we do some actions in our test, related methods in listener class that
corresponding to these actions will run automatically.
There are a lot of listeners available in TestNG, but considering testing, a few of them can used
effectively. Such as ISUITEListener, which has two methods: on Start(), OnFinish().
1ST round-TECHNICAL
XSSFSheet sh = wb.getSheet(sheetName);
I have some reusable methods and i have some new feture,so i want to
acess the reusable methods to my current application,how can i do
that?
Is it possible to write the xpath using IE browser?
What exactly your file structure looks like when you are automating
something by using of eclipse ?
How did you verify that given number on webpage in sorted order ?
How can i do priority based testing using webDriver ?
Write a login code using page factory ?
I do think so. No matter which framework we use for our project, we always have to
read external data to test the application. The methods associated with reading and
manipulating datasets should be stored in a generic lib, so that we can simply call
them whenever we want in our scripts. This make our code easy to read and easy to
maintain, also enhance the reusability of our codes.
Selenium doesnt have built-in reporting functions and we have to rely on 3d party
tools for report generation for our automation. TestNG has default reporting function
and we can also create very attractive reports by implementing extent reporter with
the help of ExtentLibrary. We can implement extent reporter by extending
ItestListener interface and call the listener class with help of TestNG suite xml data.
We can also create extent reports using TestNG annotations such as before
methods, before class, after class, onTestfail, onTestSkip or onTestSuccess.
What is TestNg ?tell me the annotations of TestNG? (if you are using
TestNG)
Can you write a sample for parallel execution in TestNG.xml file?
<listeners>
</listeners>
<classes>
</classes>
</test>
</suite>
3RD round-maneger
Gv ur intro with your roles and responsibilities?
How many bug you hv found on your project?
Can you please explain flow of your project?
7th- HR round
Tell me abt yourself in 3 areas (education,job,hobbies)
What are the challenges u have faced?
Some qsn from your hobby?
Some more qsns?
A build refers to part of the software that under test. It is given by dev team to test team for
testing. Release refers to the software or product that is no longer in testing. It is the formal
release of software product to its customers. After test team test the build and certify it, it can
be formally released to customers. A release usually has many builds. A build can be rejected
by test team if any major part fails or it doesnt meet certain requirements.
4>what are points u remember while writing test cases?
Test cases are set of conditions to determine whether an application under test meets the
requirement or works properly.
Each test case should be simple, isolated and atomic. Each of them should be easy and fast to
execute, independed of each other, pass and fail independently, each of them should have
expected result.
While testing an application, if the bug was detected by end user or customer, not by the
testing team, it is called bug leakage. If the software if released with low severity bug, it is
called bug release.
Test steps: 1. Try to grab the with single hand Expected result: user should be able to grab
the bottle easily and fell comfortable
Test steps: 1. Try to grab the with single hand 2. Walk 10 m with the grabbed bottle 3. Place
the bottle on the desk. precondition : tc1 should pass, expected result: user should be able lift
and carry the bottle without much problem
Tc1: to test if its shape is good fit with users with age around 13
Tc1: to test if its shape is good fit with users with age around 70
Tc1: to test if its shape is good fit with users with age around 70
7>about project?
8>what is non-functional testing?
Load testing is carried out by constant and steady increase of system load until the
threshold limit. This kind of test is to study the behavior of application under various
loads and to determine the reliability of the system. In load testing, we measure the
system performance based on a volume of users. There are two types of load
testing.1 longevity testing: to subject the system to maximum work load for a long
period of time. 2. Volume testing to test how the system behaves under sudden
spike of work loads.
Stress testing is carried out by subjecting the system to an excessive strain, such as
by exerting huge work load without pause to check when the system breaks, if it
recovers from the break or not. Stress test is to test the stability of the system and
to define the breaking point of the system.
Driver.manage.deleteAllCookies();
5. there are 5 input box in a page and first i have to select 3rd input box write
some data into it and
return back to 2 input box. how u will do it. asked in synechron
List<WebElement> inputElements = Driver.findByTagName(input)
inputElements.get(2).sendKeys(some data);
WebElement secondInput = inputElements.get(1);
6. difference between Hash map , Hash Table and Arraylist ? asked in synechron
7.about yourself.
8.project description.
13.
it's a overloading or overridding will it compile or not.
public int m1(int a,int b)
public float m1(int c,int d)
14.we have a excel sheet some thing is written in excel sheet then compare those
value with web page values.
16.string reverse .
Finally is a block and usually placed after an exception handler. The code clock
contains finally will be executed no matter the exception handled or not.
In java, arguments are all passed by value. With java objects, the object reference
itself also passed by value and so both the original reference and parameter copy
both refer to the same java object.
3.How to find out the length of the string without using length function
From manual
what is the testcase technique
why we write test case.
bug life cycle
what are the different status of bug
what is the different between functional and smoke testing
what is STLC.
from Selenium
what is testng and its advantage
how to handle SSl/
how to handle alert
how to take screenshot
give the diagram write a scrpt..
tell me about Project .What are the challenge face during project
what is the difference between RC and webdriver
what is freamwork explain it.
why we use wait statement.
2nd technical
he gives a application & tell to write the scenario
some manual testing concepts.
All the best....
Synchronoss
1. oops concept
2. Login code
3.jdbc connection
4. Framework explain
5. Abstract and interface
6. Rtm
7. Test design technique
8. Regression testing
CTS interview and following are the questions which i couldn't answer. Could you please
provide me the answers for below questions.
In Java, you can use the File.length() method to get the file size in bytes.
(IN F2F THEY ASKED QUESTIONS ONLY FROM MY PROJECT & SOME PROJECT
RELATED SCENARIOS)
1.Tell me about your self.
3.what will be your approach if you have to automate signup for 100 profile.
14.if i click on any product then it will redirect to a new page that display the product image and
its attribute how you will verify that not based on your header on your page based on attributes
WebDriver directly interacts with browsers with built-in browser support, while Selenium RC
injects java script to control the browser. WebDriver is a simpler architecture and doesnt
necessarily need selenium server to run browser, while RC needs to start selenium server. So,
Webdriver is faster than selenium RC. WebDriver supports HTMLUnit, RC do not. RC can
control all browsers since it doesnt require built-in support and WebDriver may not support new
browsers.
17.is there any diff in coding if you are writing code for diff browsers
18.tell me about locators
--------------------------------------------------------------------------------------------------------
1st round :
1. Explain SDLC
2. what is xpath
3. roles and responsibility
4. Database connectivity
5. code to get date from excel sheet
6. Types of Framework
7. Which Framework u used and tell about ur Framework
8. How u handle exception in selenium
9. What is finally
10. Encapsulation
11. Access Specifiers
12. Final keyword with variable,method and class(what will happen)
13. What is object
Class is a blueprint that defines variables and methods that common to all objects of a
certain kind. Object determines the behavior of a class and it contains all the methods of a
class and its properties.
14. It is necessary every time to create an object of a class
No! we dont have to create and object for a static class. We can just import it and call the
methods directly from class. We dont have to create an object for superclasses which are
inherited. We can call the methods directly in the child class.
15. Using which keyword we acquire the behavior of one class to another class
extends
16. How do we create User Exception
we can create a class and extend it to built-in exception class. In the created class, we can
create a user defined exception in a way like creating a method. In another class, we can
throw this user exception using throw keyword.
MyExeption()
Try{
Catch(MyException e)
{e.printStackTrace();
}
17. What is subString()
3rd Round(HR)
1. Tell about ur background, education and job, ur family
2. Why our company
3. Why u want to leave ur previous company
4. Tell something about our company
5. What do u think what are the factors this company can give u
6. After 3yrs, then after 5yrs where u want to see urself
Cisco telephonic interview questions for exp
1.how to open a file and count the no of words and no of character and
no of lines
2.String reverse
3.Group by function in SQL and inner join
4.how to ignore a method in test(means what annotation we used)
5.All types of Test case for save a file in notepad
6.What is AJAX .Brief Description
7.how we do the parallel execution
8.How to handle the drop down list
9.Test cases to Test A pen(ALL TYPES).
10.Project Description
11.Diff in Junit & TestNG
12.if we add any module in facebook then process flow of testing.
13. what is prestisite testing and Step up process Testing some thing like that.
14.Robot Class
OAK systems
1.How to explain the framework without the testng,maven,testngsuite. which will have only
libraries,assertions,testbase and PSL.
5.After automation testing is completed assume that new requirements have been added how will
you handle this in automation??
synchronous technologies
a thread is programs path of execution. Sleep is a method of thread class and it allows
currently executing thread to sleep for the specified number of milleseconds.
Collection represents a single unit of objects. Collections in java is a framework that provides
an architecture to store and manipulate the group of objects. List, Queue and Set interfaces
all extends Collections interface. ArrayList and LinkedList classes both implement List
interface. ArrayList is implemented as resizable array. As more elements are added to
ArrayList, its size is increased dynamically. Its elements can be accessed directly by using
get and set methods with their location index. LinkedList is implement as a double linked list.
Its performance on adding and removing is better than Arraylist, but worse on get and set
methods. Set interface is implemented in HashSet, TreeSet and LinkedHashSet. All of them
do not allow duplicate elements. HashSet doesnt maintain order, LinkedHashset maintains
insertion order of elements muck like List interface. TreeSet maintains sorting order of
elements.
ArrayList stores elements consecutively side by side allowing random access. If you know
the index of the item, you can get it directly. Whereas LinkedList requires you to check each
item until the wanted element is found.
Queue interface is a Collection of objects accessed in the order they are inserted.This is
useful when we need to process a list of items in the order we have received it.
PriorityQueue and ArrayDeque implement Queue interface.
HashMap, TreeMap and LinkedHashMap all implement Map interface. HashMap doesnt
guarantee iteration order. TreeMap will iterate according to the Natural order of the keys.
LinkedHashMap will iterate in the order of in which the entries were put into map.
9.overloading , overriding
10.wat is d super most class in java and what are the different
methods in d same
Object in Java.lang pachage is the super most class in java. Unlike other parent/child class it
doesnt require extends keyword to inherit. You can use or call methods of object class from
any other or overwrite them.
11.asked to write code for this.alert page is given with Id field and
v should enter value to dat field and accept it.
HCL INTERVIEW
What is FAT 32 ...? (Could not reply it. I only know FAT = File Allocation Table)
c.testing a system feature using only the software required for that action
d.testing a system feature using only the software required for that function
a.compatability testing
b.performance testing
d.content testing
a.rejected
e.fixed
5.in a company web page the company logo is not appearing, then the defect on
which below combinations(severity and priority)
a.low severity and high priority
7.the newly created product that satisfies the accepted criteria after the defect is
fixed, retested and closed is termed as
b.defect prevention
c.corrective action
d.defect resolution
d.the response time shall be less than one second for the specified design
load.
d.a,b and c
10.error guessing:
11.beta testing is :
a.statement testing
c.path testing
c.
14.which of the fallowing would NOT normally from part of the test plan?
a.incident reports
b.features to be tested
c.risks
d.schedule
a.LCSAJ
16.what type of review requires formal entry and exit criteria, including metrics?
a.walkthrough
b.management review
d.inspection
b.bad luck
a.large
b.small
c.difficult to write
d.difficult to test
a.are most useful in uncovering defects in the process flows during real world
use
b.are most useful in uncovering defects in the process flows during the
testing use
c.are most useful in covering defects in the process flows during real world
use
a.unit testing
b.beta testing
c.stress testing
d.mutation testing
23.changes made to an information system to add the desired but not necessarily
features is called
a.preventative maintenance
b.adaptive maintenance
c.corrective maintenance
d.perfective maintenance
24.all the modules of the system are integrated and tested as complete system in
a.bottom up testing
b.top-down testing
c.sandwich testing
d.big-bang testing
26.each time a defect gets detected and fixed, the reliability of a software produ...
a.increases
b.decreases
c.remains constant
a.design errors
b.analysis errors
c.procedure errors
d.
28.top down approach is used for
a.development
b.identification of faults
d.reverse engineering.
b.scope,constraints,market
c.technology, finance,time,resources
30.orthogonal array testing enables the test designer to maximize the coverage
devised for relatively small input domains.
a.true
b.false
b.check list
c.spreadsheet
d.cause-effect graphing
32.verification that the process delivarables/phases are meeting the user's tr...
a.inspection
b.reviews
c.acceptance testing
d.acceptance criteria
b.unit regression
c.regional regression
d.retesting
a.functional testing
b.stress/load testing
c.recovery testing
d.integration testing
a.white box
b.glass box
c.structural
d.functional
a.LOC
b.function count
c.program length
d.cyclomatic complexity
37.which of these terms is a level name in the capability maturity model?
a.adhoc
b.repeatable
c.reusable
d.organized
c.technology, finance,time,resources
40. for a project, QA team has logged 279 valid and 21 invalid defects and customer
of UAT phase, 18 defects are identified which... during internal testing.
you have a text box in 1st page whatever number you put into textbox after clicking
on OK button the same number of button should appear into next page..How do you
test..?
Manual testing
1st round
1. How do you test a washing machine? Dont tell me usual testing scenarios. Tell
me some creative scenarios.
3. Can you explain how you have done Web security testing?
4. Spiral Model
Display
A B
8. What will you do if you are asked to work late night and on weekends?
2nd round:
10.Tell me the differences in testing web and standalone app. What things we
should take care
while testing these applications.
11.You have 6 drop down list and for each drop down list there are 8 choices.
How will you test this? How many test cases should be written
12.In your sprint you have found a critical bug but developers say that they cant
fix it. If the bug is not fixed we cant deliver anything to clients because other
features are dependent on these features. Now what will you do in this
situation.
13.Some scenario was given like in metro we have something like peak hours
and non peak hours
So discounts will be given at non peak hours
5.00 am to 7.00 am -50%
7.00 To 4.00 pm-no disc
4.00 To 9.00 pm -20%
9-12.00AM-no disc
12.00-5.00 am-30%
How many test cases will you write for this scenario and what values will you
test
14.3 puzzles he asked me
3rd round
1. 2 puzzles he asked me.
2. Defect life cycle
3. Why bugs will get rejected
4. How can you avoid from bugs getting rejected
5. Do you know BVA.What is the rational behind it
6. Do you remember your engineering subjects?
He asked me to draw architecture of microcontroller
Opamps basic question he asked
7. Say you have 100 regression test cases n you have 4 days to execute. But
you can execute only 20 per day. What will you do in this situation? You
have to execute all 100.you cant leave any
8. Tell me abt your project
9. Asked after few yrs would I like to continue in technical or would like to
shift to non technical
10.Exploratory testing
11.What is severity egs of bugs for each severity
12.Explain how agile model was implemented in your project.
13.How much would you rate yourself as test engineer justify it.
Quadwave
Valtech
Telephonic
1.how do you handle dynamic element if the value is changing frequently
2.what is d code to get data from excel and write back to excel
3.wat is d browser used in your project and how to use other browsers
in selenium
4.explain your framework
5.wat are d different element locators are there and which locators
you used more in your project
Face to face interview questions
1 write your framework and explain the same
2.where do you store objects?
3.where do you store element locators
4.how do you execute two or 5 testcases alone in testNGsuite.
5.challenges faced while migrating from Rc to webdriver(since i had
mentioned Rc and webdriver both)
The Test Strategy document is a static document meaning that it is not updated too
often. It sets the standards for testing processes and activities and other documents
such as the Test Plan draws its contents from those standards set in the Test
Strategy Document.
5) what is test plan document and explain the contents briefly.
Ans- The Test Plan document is derived from the Product Description, Software
Requirement Specification SRS, or Use Case Documents.
The Test Plan document is usually prepared by the Test Lead or Test Manager and
the focus of the document is to describe what to test, how to test, when to test and
who will do what test.
6) what is regression testing, how did u perform in your project?
Ans- Re-executing the old TC's in the new release to make sure that changes has not
affected the existing features is called as regression testing. Explain as per ur proj.
7) how was QC useful in testing process in your project to log & track defects?
Ans- It is not used in my project. Explain if it is used in urs.
8) what are the different types of testing life cycle models, which type of testing
model does your project follow?have you worked in agile methodology in any of
your project?
Ans- Types- Waterfall, Spiral/Iterative/Cycle, Prototype Model, Agile.
My project is using Agile methodology.
9) SQL query to find out 4th maximum salary.
Ans- SELECT SALARY FROM TABLE
WHERE SALARY IN
(SELECT SALARY FROM TABLE
ORDER BY SALARY DESC
FETCH FIRST 4 ROWS ONLY)
ORDER BY SALARY ASC
FETCH FIRST 1 ROWS ONLY
10) write the self join query in order to find the department of the manager of a
manager whose department is ABC.
Ans- Employee
emp mngr dept
A B ABC
B D HR
D E Dir
11) different types of joins, simple SQL queries like select, update etc.
Ans- inner join, left join, right join, full join.
12) simple unix commands to list a file, find all files which contains the desired word
say your name in them.
Ans- Unix I am not sure.
13) what is your role in your project, how do you overcome hurdles that you might
face when your immediate senior/manager is not present to attend a meeting with
client and you have an important thing like an application crash occurs during
testing, how do u handle such circumstances?
Ans- explain urs.
14) explain java in layman terms if I don't understand any technical stuffs like
private, class or object..
Ans- Java is a programming language which is plateform independent i.e. we can
compile code in one machine and can run in another machine with different OS. We
can develop different kind of applications using java.
15) explain automation architecture and how what kind of architecture was in your
project an explain it.
Ans- explain ur framework.
16) why do we use interfaces? Why is interface concept present when something
could be achieved using classes or abstract classes?
Ans- to achieve 100% abstraction and standardization. By using classes and
abstract classes we can't achieve 100% abstraction bcoz loop holes are there.
17) tell the use of abstract classes over interfaces, and how are interfaces built in
terms of methods declared and variables within it..?
Ans- If the functionality you are creating will be useful across a wide range of
disparate objects, use an interface. Abstract classes should be used primarily for
objects that are closely related, whereas interfaces are best suited for providing
common functionality to unrelated classes.
Interfaces can have only incomplete methods and all methods will be non-static and
public. Variables declared inside interfaces will always be final, static and should be
initialized.
19)Giving an example, he asked me to chose which collection would I chose for that
particular scenario.. Like getwindowhandles returns set, but can I also make use of
list or any other collection? Similar questions..
Ans- No we can't use List.
19) testNG and how you could initiate your automation script..
Ans-TestNG is a unit Testing tool/Framework; We can run TestNG class directly or
through TestNG Suite(xml) we can also integrate with other tool like ANT, Maven,
Jenkins
20) how to connect to database using selenium, it's requirements for connection
and commands for connection.
Ans-using JDBC.
Example
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/student","root","");
Driver a = DriverManager.getDriver("com.mysql.jdbc.Driver");
ResultSet r = con.createStatement().executeQuery("select * from student");
int cc=r.getMetaData().getColumnCount();
while(r.next())
{for (int i=1;i<cc;i++)
{
System.out.println(r.getString(i));
}
}
r.close();
con.close();
22) write a program to check if the given input is palindrome or not by taking input
from user at runtime.
Ans- class Palindrome{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int a = n;
int palindrome =0;
int r = 0;
while(n>0){
r = n%10;
n = n/10;
palindrome = palindrome*10 + r;
}
if(palindrome==a){
System.out.println(a+ number is palindrome.);
}else{
System.out.println(a+ number is not palindrome.);
}
}
}
23) what is advantages of using testng, why can't we run selenium code directly?
Ans- can have 3kinds of report, parallel execution, skip a particular tc, change the
order of execution, lots of annotaions, can execute without main method etc..
It is not necessary to use testng.xml to run the selenium code. You can directly run
your selenium code. In order to create a test suite and run seperate test cases, you
need some framework which drive the automation. Here testng.xml can be called as
"driver" which drives several test cases automated using selenium code.
24) have you worked on Jenkins? What is advantages of it? What if developer does
not use Jenkins, but testing team has been asked to use it? Can you do so without
developer creating the build in Jenkins, your automation code can start?
Ans- Jenkins is a continues integration tool; we use it to start the framework
execution automatically as soon as the build is received from dev team ; If Dev
team is not using Jenkins still testing team can use it where we can schedule the
framework execution time or we can write customized script which can trigger the
Frame Work
25)disadvantages and advantages of selenium, where can all I not use selenium?
Ans-
Disadvantages- can't automate windows based application, Cant Handle Tab
Browseres ,Cant Handle Existing Browser; Cant Hanled Flex/Flash application etc.
Advantages- Free,Open Source, Platform independed;Supports All Browsers
26) given just 2days and you have like 100 testcases to manually execute and your
colleague is on long leave, what will you do? U think this situation can occur real
time? Can u execute all testcases alone within deadlines?
Ans- depends on the complexity of the application, if the each tc won't take much
time then we can execute 100 tc. If it's taking much time in that case we will
execute the test case's on the priority and severity basis. Like new test cases should
be executed and if time remain then we will try to execute as many as we can from
the existing tcs.
27) what is the code to find the active element in the web page?
Ans- List<WebElement> allElements = driver.findElements(By.xpath("//*"));
for(int i=0;i<allElements.size();i++)
{
WebElement e=allElements.get(i);
if(e.isEnabled())
{
System.out.println(e.getTagName());
}
}
28) write a selenium program to verify that the navigation of the web page is
landing at the correct URL at the next page..
Ans- driver.fiindElement(By.xpath(xpath of anylink which u wan to check)).click();
String expURL = give expected url;
String act = driver.getCurrentUrl();
Assert.assertEquals(act,exp);
refer http://testng.org/doc/documentation-main.html#testng-xml
31) code for switching frames back and forth( getting into frames and out to main
frame)
Ans-
driver.switchTo().frame(arg);
driver.switchTo().defaultContent();
32) write a program to extract information from xl sheet and print it to the reporting
sheet(reporter.log) and console.
Ans- FileInputStream fis = new FileInputStream(path of file);
Workbook wb = WorkbookFactory.create(fis);
String info =
wb.getSheet(SheetName).getRow(rownum).getCell(cellNum).getStringCellValue();
Reporter.log(info, true);
34) code to write the usage of actions class with an example, usage of select class
Ans- ex- Actions act = new Actions(driver);
act.moveToElement(webElement).perform();
35) switching between the two browsers(parent and child), popup differences and
identification.
Ans- Iterator<String> it = driver.getWindowHandles().iterator();
String parent = it.next();
String child = it.next();
driver.switchTo().window(child);
driver.switchTo().window(parent);
36) how to make use of external support like AutoIT or robotium and at what
conditions?
Ans- They are used to Handle Winow Popup
(Refer class notes for details)
37) can we do any mouse actions like click using AutoIT? If yes how, if no what is
the alternative?
Ans-
MouseClick("left")
//Double click at the x, y position of 0, 500.
MouseClick("left", 0, 500, 2)
Einfochips
1. Can we use Xpath for Internet Explorer?
Ans- yes, we can use. But as of now we don't have any specific tool to verify
the xpath in IE as firepath in FF.
2.Which Repository we are using in selenium for .xls sheet(To store and
retrieve data from .xls sheet )?
Ans- we can store it inside project i.e. open the java project and copy the .xls
file there and use it.
3.Different way to find out the web elements?
Ans- xpath(), tagName(), className(), linkText(), partialLinkText(),
cssSelector(), id(), name().
4.What is the command to open the Firefox Browser and URL?
Ans- WebDriver driver = new FirefoxDriver();
driver.get(url); or driver.navigate().to(url);
5.What is Hybrid Framework?
Ans- Its is the combinations of Datadriven, method driven, modular driven
frameworks.
6.What is the difference between Hybrid Framework and Function driven
Framework?
Ans- In Function driven fw,we use the same functions/methods again and
again by calling them in different modules. Hybrid driven framework is the
combinations of Datadriven, method driven, modular driven frameworks.
7.When we use CSS Selector?
And- it is used to find any web element in the web page. Some time it is
better to use css selector in place of xpath because of performance point of
view.
8.What are the difficulties faced by you using selenium ?
Handling Popup;Mouse actions;identifying dynamic elements; integration with
other tools..
2. ----------------------------------------------------------------------------------------
What if the static keyword is removed from public static void main , what is the
result or the output or error ?
How do u locate webelements on windows based application ?
Diff between verify and assert ?
Difference between interface and abstract ?
Wat is smoke testing and sanity testing ?
When u perform smoke testing how do u favour it to the uat team for further testing
?
Explain webdriver ?
Diff between CSS and xpath , why prefer xpath ?
Why use selenium webdriver over selenium rc ?
Explain defect life cycle ?
How do U choose test cases to convert dem to automation scripts ?
How do u obtain data for automation ?
How to obtain all links present in webpage ?
4. TestNG
5. Your project has to be delivered tomorrow
but u know it can't be done what u will do?
6. In online shopping cart app
if customer purchases 100 products he gets 5% discount
if customer purchases 150 products he gets 10% discount
how do u automate this?
ANS:=>Using Data Driven framework
2.webdriver code to read the data from excel sheet and login into application
7.code to click on a link which will open another window and perform an operation
on 2nd window to open a frame and then perform an operation on a frame
13.what is SVN
14.what is selenium grid and why we use this
20.regression,compatibility,adhoc,smoke,useability.load,stability,security testing
and why we do these testing
27.throws for runtime or compile time? and try catch for runtime or compile time?
4.code to find a particular word from a string and explain line by line
Huawei technologies
1.login page is given with time limit 2-6 Seconds page takes to
load.asked me to write code to test this page.
2.test cases to test ATM machine with 10k transactions per day,3 is d
max transaction limit,4k max transaction amount.
3.TEsting life cycle.
4.gave one xml file asked to write a code to test whether all opened
tags are closed and say it is proper xml.
5.LOGIC of palindrome
6.wat is queue,stack,linked list,circular linked list,dqueue
// manhattan associates
1.written test :java,manual testing,aptitude question
2.tell me abt ur self?
3.junit vs Testng?
4.write a script for google search?
5.explain architecture of ur project?
6.what is Webdriver?
7.puzzles
8.delete vs truncate?
9.joins in sql?
10.rc vs webdriver?
11.what r roles and responsibilities in ur current project?
1. What are the flavors of selenium?
2. What is selenium?
14 what are the different assertions or check points used in your script?
24. What is the difference between beofe method and before class
29. how will you read data from external files (excel)
38. what are the challenges or issues you faced while automating the
scripts?
There are 4 types of access modifiers in Java: Private, Default, public and protected.
//symphony
1.assert vs verify?
2.explain oops concepts?
3.hashmap vs hashtable?
Hashtable is synchronized whreas hashmap is not. Hashmap is better for
non-threaded applications.
Hashtable doesnt allow null keys or values; hashmap allows one null key and
any number of null values.
Hashmap object values are iterated using iterator. Hashtable is the only class
other than vector which uses enumerator to iterate the value of Hashtable
objects.
3. array vs arraylist
An array is basic functionality provided by Java. ArrayList is part of collection
framework in Java. Elements in array are accessed using index and
assignment , such as array[3], whereas elements in ArrayList are accessed
by get and set methods. Array is fixed in size, Arraylist resize itself
whenever a new item is added. Array can hold both primitive data types and
objects, but ArrayList can only hold objects. If we try to insert primitive data
types to ArrayList, data is automatically boxed into wrapper class. Elements
in Arraylist can be iterated through Iterator or for loop or for-each loop, while
elements in array cannot be iterated through iterator. The size of array is
checked with lenth() function , the size of ArrayList is checked with size()
function. ArrayList is one dimentional while array is multidimentional. To add
element to ArrayList, we use add() method, for array,we use assignment
operator.ArrayList provides methods like indexof(), replaceall(), get(),
contains() methods to manipulate its elements.Whereas array doesnt
provide such methods.
4. interface vs abstract
Abstract class is a class type in java, while interface is a reference type in
Java.
Syntel .
2.What is SDLC?
7.What is Ajile?
1. 1
aa
222
bbbb
33333
write java program for a above pyramid
2. how to find broken links on page using selenium webdriver?
3.there are 100 testcases i want execute only 3 test cases without using testng groups
4:what is reflection API? with example
5.how u validate email id in selenium?(in qtp we use Reg Exp for validating string)
6. how do u adapt i ur company if requirements keep on changing?
7.Stress vs load testing vs performance testing?can we use selenium for the performance
testing?
QSG
The interview questions are-
1.Give an example for abstraction(writing program)
2. how many test cases have u written and automated
3. What are the challenges u met while automating.
4. How will you handle drop down list
5. How will you Download popup
6. What are the different browsers u have used
7. What are the settings to be done in case of IE chrome and Firefox browsers
8. What's Overloading and overriding n difference
9. How so u use selenium ide
10. 3 versions of selenium n drawbacks
11. In eclipse while automating how will b your file structure of your scripts
1. 1
aa
222
bbbb
33333
write java program for a above pyramid
(Rounds: 7)
Emids
Q-how to enable firefox addon for the web driver launch browser?
Q-how to handle ssl certification pop up in IE Browser?
write a Script on Google search edit box, write part of the word and
get all the items from the auto suggest list and display it inconsole?
how to select last value from the dropdown without using getoption()?
1.what is quality?
2.why we do testing?
3.diff bw qa & qc
4.why dev are not doing testiing?
5.why you want to make your career in testing? & some puzzles...
Selenium questions :-
1. framework
2. Ant
3. Jenkins
4. xpath
5. How to integrate Jenkins with github ?
6. How to start qc server ?
7. Bug tracking tool
8. How to create Graphical report ?
9. write a code(script) for the given testcase(around 10 to 15 lines code)
10. how to execute parallel test case?(write code)
11. how to execute your script on chrome and IE ?(code)
12. pop-ups and frames(some codes like how to handle a file download pop-up )
Sql :-
1.DDL,DML,TCL,DCL commands and query
2. view and index
3. joins
4. constrains (keys)
5. How to create a package and procedure in pl/sql?
Interview questionsIBS
13. What are the domains which you have worked on?
Regression testing
integration testing
functional testing
role
black box
test plan
asked my projects
Tavant
3. If there are 200 test case and only 2 days to execute. How you will proceed?
4. Puzzles : If there are 2 wires of equal length. Burning 1 wire takes 60 mins.
How will you calculate 15 mins if you dnt have watch or clock?
5. Given a cloth bundle of 200 meter. Cutting 1 meter takes 4 secs. How much time will be
taken to cut the 200 meter cloths?
Rates Category
Types of deposition
1. Traceability Matrix
3. How will you pick regression test case if I Give you 50 Test cases
6. Internationalization testing
7. How you make sure that you have covered all scenarios?
Robert Bosch
Testing Questions:
Selenium:
1. what is selenium-ide?
2. what is type of locators?
3. what are challenge you face?
4. what is the difference between selenium remote control and selenium
webdriver?
5. what is the difference between Junit and testNG?
6. what is assert?
7. what are the type of automation framework?
8. what type of annotation?
Java:
1. what is abstraction?
2. what is encapsulation?
3. what is polymorphism?
4. they had given one matrix program and test only logic.
SQL:
Manager round:
1. What is the procedure you follow test the application?
2. What is difference between data driven module.
3. What approach would you take to test critical application.
4. How many employee are there in your current company.
5. What is your roles and responsibility in your current company.
IGate Interview
1st round
What is selenium
what is Jenkins why we need iy?
what are the differences between rc and web driver
Difference b/w Grid & WebDriver?
Daily role in offfice?
About current project?
What is TestNg?why we need it?
Write code for gmail Login in RC & Driver?
Have you ever impressed your client?
2nd Round
Tell me about yourself?
Current project full end to end scenario..?
Differences bw RC and Webdriver
what is abstract class how it use for us?
What is Datadriven framework & Keyword Driven?
what is the difference between / and // in xpath
SDLC & Stlc?
We have SDLC but why we need STLC?
How you improve your knowledge on project?
Bug life cycle?
Did you involve in Test plan preparation?
What is smoke testing & sanity?
What type of testing did you do in your work?
If I give 5 freashers you only responsible what will you do?
What are that challenges you faced?
what value would u add to our company?
3 Round HR
Why you are leaving?
How much salary you are expecting?
Next 4-5 year where you will be?
Salary slips,hike letters ,Notice period
MANHATTAN
1)What are the components of selenium?
2)What kind of AUTOMATION FRAMEWORK u are working upon?
3)If an object is changing after every build ,how can u handle it through coding?
EX-: "NAME" IS A TEXT FIELD,AND DEVELOPER KEEP ON CHANGING THE THE
NAME OF THIS TEXT FIELD
4)I Want to execute one FEATURE 50% and then want to execute other FEATURE fully, how
will u do it?
5)What are the issues u have faced in the AUTOMATION FRAMEWORK?
6)Want to execute particular module ,what will be your approach?
7)On what platform JENKINS is working?
8)How in JENKINS u will execute particular module?
9)How the testng class's execution happen?
10)What is the difference between ID and NAME?
11)What is the advantage of using locators like ID ,NAME over XPATH?
12)HOW u are executing the application on different platforms(OS)?
4.program to display sysdate and time in text file (using file handling)
5.code for handling url in firefox browser?
6.How to get the text from the UI in runtime?
7.What is Check-in & check-out revert?
8.Which repository you have used to store the test scripts?
9.How to work with web list @ radio button in web driver?
10.How to work with dynamic web table?
GE
what is encapuslation?
wat is fianlly block ?how execution goes ?is finally block executes isrespective of expection or
not
given a scenario that 5 test cases r there i need to excute first and last 3 means 2 one shld not be
excuted ?how u make a changes in testng xml file
explain how will automate drop down list ?how will get size ?and text present in it?
---------------------------------------------------------------------------------------------
3.what is hybrid?
8.what is xpath
2.What is SDLC
5.What is Selenium RC
9.Write an sql query to list first 10 rows in two columns empname and salary
19.What is agile
20.What is sprint
29.Aptitude test booklet consisted of 15 pages and 29 questions and in them few
questions had 5 sub questions and time limit is 1 hour.
31. Selenium Framework that you are using in your current project?
34. How do you differentiate check box if more than one check box is existed in your
application?
1. sendKeys(Keys.ENTER)
driver.findElement().isSelected();
driver.findElement(By.linkText("")).getAttribute("href");
driver.findElement(By.xpath("")).getAttribute("src");
System.out.println(allLinks.size());
chkBox.click();
for(int i=0;i<=allChkBoxes.size();i++){
allChkBoxes.get(i).click();
driver.findElements(By.tagName("img"));
17. How do you work with page onload authentication popup / windows based
popup?
26. Write the code for Reading and Writing to Excel through Selenium
28. What are the different exceptions you get when working with WebDriver?
Other questions
1. What is the current WebDriver version?
2. What is SIDE?
3. What is WebDriver
4. Explain the challenges you faced in automation
5. What are the languages supported by WebDriver?
6. What is the difference between verify and assert?
7. What are the limitations of Selenium IDE?
8. What are the browsers supported by Selenium IDE?
9. What are the disadvantages of Selenium?
10.How many ways can you identify an element using WebDriver / which are the
locators used for recognizing the objects in selenium WebDriver?
11.How do you clear the contents of a textbox in selenium
12.Is it possible to interact with hidden elements using WebDriver?
Framework questions
1.What is a Framework?
General questions
6. Which are the locators used for recognizing the objects in selenium webdriver?
11. Explain the technical problems that you had with Selenium tool?
16. How many programming languages can you use in Selenium Web driver?
22. How to verify that an element is not present on a page?// use . length
25. How do you verify that the given list of numbers on a web page is sorted in
ascending order?
27. Which is the package which is to be imported while working with webdriver?
Jason huggins
Simon stewart
30. How to verify whether the background color of a paragraph is green or not?
Driver.findElement().getCssValue(background-color)
33. How do you check that the pagination on google search page is working fine or
not?
For chrome:
45. How to handle the dynamic alerts which don't always appear?
48. How to run the tests without a browser or with HTML unit driver in
selenium webdriver?
// Navigate to Google
driver.get("http://www.google.com");
element.sendKeys("Guru99");
61. How to change the URL on a webpage using selenium web driver?
62. How to get the CSS attribute of a web element using web driver?
Sportskeeda
We have 65,000 URLs which we release 3 times a day. How will you test using
selenium ?
keep 6500 urls and destination page in 10 excel sheet(10X6500=65000)
use threads and run the web driver code to check URL present in each sheet.
happiest mind
1. how to right click,
2.how do u do mouse action.write a program.
3.design framework.
4.what is constructor
5.5.what is inh
1. How to work with page onload authentication pop up/windows based pop up
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.firefox.internal.ProfilesIni;
public class Demo {
public static void main(String[] args) {
ProfilesIni prof = new ProfilesIni();
FirefoxProfile p = prof.getProfile("default");
WebDriver driver = new FirefoxDriver(p);
driver.get("http://demo.actitime.com/login.do");
}
}
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
Thread.sleep(3000);
FileUtils.copyFile(((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE),new
File("d:/abcd.png"));
How to add it in to result window
Reporter.log("<img src='d:/abcd.png'></img>");
-Dorg.uncommons.reportng.escape-output=false
How to enter date in date field using java script in web Driver?
How to take complete screen shot of the application and screen shot of
required element?
1. Suppose we have multiple tabs like in TestNG(Failed Tests,Run Last-test etc..)how will u
handle it?
if a tab is inside a page then it will be like clicking on Link, but web driver cant handle
tabbed browser
2. How to check whether the check-box or radio is checked or not?What is the method?
isSelected
3. In a drop-down we have many options out of which i want to write xpath for particular
option,How will u write?
//select[@name='somename]/options[1]
4. We have two similar hidden elements with same attribute how can u write xpath?
6. Using AND,OR operation how can u write xpath for dynamic elements?
//a[text()>6 or text()<9]
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" ) ;
Connection conn = DriverManager.getConnection( "jdbc:mysql://server","un","pwd" ) ;
rs.close() ;
stmt.close() ;
conn.close() ;
4 to 5
11. I have a server message(Report generated successfully) but i need only report,how u
write the script?
String sMsg=driver.findElement(By.id()).getText();
System.out.println(sMsg.split(" ")[0]);
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" ) ;
rs.close() ;
stmt.close() ;
conn.close() ;
its a meeting
NO
We use "TakesScreenshot"
xpath is powerfull
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
File f = ((TakesScreenshot)driver).
getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(f, new File("d:/abc.jpg"));
regression
its a load testing tooll, can be used to test JDBC database connections, FTP, LDAP,
Webservices, JMS, HTTP, generic TCP connections and OS Native processes
NO
QTP is proprietary software of HP, can automate any type of app, uses VBS
Selenium open source, only for web app, uses java/python/ruby/C#
Cant work on existing browser, handling window popups, cant handle tab browser....
10. What is the difference that Selenium do extra than QTP?
15. How to identify 2 buttons (every thing same) but one is invisible?
//input[@style="visibility:hidden"] //visibility:visible
Star mark
Selenium WebDriver
------------------
8)What is WebDriver?
9)Can you inspect an WebElement with FireBug if the Browser is opened by WebDriver?
Core JAVA
---------
1.How to retrieve the data from XML for login page?write a script..
String
un=doc.getElementsByTagName("un").item(0).getFirstChild().getNodeValue();
String
pwd=doc.getElementsByTagName("pwd").item(0).getFirstChild().getNodeValue();
2.I have 50 test cases out of which i need to run only 1 to 10 testcase how do u handle?
Use testing.xml
Select only 10 testNG class, right click and select convert to TestNG which creates
testing.xml
3.Write the code for retrieving data from database for login Page,where login page consists
of Emailid textbox,Password textbox,Login & Reset Button.If password is wrong should
reset,else should get login..
Please see the attached JDBC code for getting data from data base and pass them as
arguments for the method which does the above steps
4.Write the script so that any textbox should not exceed more than 10 characters?
No possible
7.How to run the tests without a browser or with HTML unit driver in selenium webdriver?
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
driver.get("http://demo.actitime.com/login.do");
System.out.println(driver.getTitle());
selenium.open("/login.do");
selenium.type("name=username", "admin");
Same as above
already code is written in selenium RC and want to use the same code in webdriver
2.3
driver.get(url);
Nothing is supported
File->add testcase
Please see the attached JDBC code for getting data from data base
using RC or WebDriver
Questions:
1. He has given a scenario, like Say there is a coffee vending machine, it has 3 buttons, one for
coffee, one for tea and one for milk.
and there is LCD display, and a led light to show whether the power is on or not.
Tell me as many as scenarios to test the functionality of the coffee machine.(both Functional and
non functional).
2. Logic to find whether the number is prime or not.
3. String comparison of two strings. (==)
4. Defect life cycle.
5.Logical thinking question: two trains are approaching each other, one is at 60kms/hr and
another is 90kms/hr.
the distance b/n them is 1800kms. What is the distance b/n them 20mns before they collide each
other.
6. Selenium code to open some browser and typing something in the text field.
7. Handling the Dynamic Check boxes inside a table.
8.Selenium code to reboot the system?
and some other Testing basics.
1.tell me some of the tools name which is used to store the script in common place?
2.how do you integrate selenium webdriver and java?
3explain with example Verify and Assert cammands?wher and when it s used?
4selenium IDE internally which language it uses?
5.Selenium IDE will allow to convert test written in java.c# when u switch over to selenium
webdriver?
6.if you have 1000 test scripts u want to execute it in 2 hrs?how you handle this environment ?is
it possible you to handle in webdriver?
7.how to get a multiple data's from excel file?example list of 10 firstname and Lastname?where
and how you wil pass the values?explain with logic nd code?
.how to get delimiters(@,":&#) from text file?
Genpact
2.How to take screen Shot in selenium code for failed Test Case.
FileUtils.copyFile(((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE),new
File("d:/abcd.png"));
3.How do u configure only Required Testcases for running the TestNG suit in XML..
add only required testng classes or create a Group and specify it
Impetus Info-tech
Difference between selenium RC, Selenium Web Driver,Selenium Core?
How to get the data from the excel sheet?
What is non-functional testing?
What is Regression Testing?
They asked much about UNIX Shell Scripting, since they need Scripting language for
automation...
JavascriptExecutor js=(JavascriptExecutor)driver;
String state = (String) js.executeScript("return document.readyState");
System.out.println(state);
mobisy Technologies
why automation
different locators
program to login to any webpage
web element methods
BOB technologies
Bob tech
Tavant
define SDLC ?
1) Where we can store xpath or other locator value , (like object repository in qtp)
2) why we can not use CSS selector instead of xpath.
3) what is difference between @Before Method and @before Test
4) what is diffrence between @After Method and @After Test
TY
manual testing:
1) Explain about Defect life cycle.
Core java;
Selenium:
1)Explain about framework?
2)How do you handle File down popup,File upload popup.and alert and confirmation popup.
3)write a code to read data from excel sheet.
Questions on selenium:
1)How do you do mouse over action.
2)How do you read data from excel sheet and notepad
Ans:i have said reading data from excel sheet so he said ok
3)Automation framework
1) Where we can store xpath or other locator value , (like object repository in qtp)
2) why we can not use CSS selector instead of xpath.
3) what is difference between @Before Method and @before Test
4) what is diffrence between @After Method and @After Test
SAP Labs
written test:
1. manual testing :
match following with definition -- test plan, test case, test procedure, test objective,requirement
--testing multiple choice more than 1 answer
2. aptitude (10 ques): area between 2 parabola.
-- probability
-- speed and time
-- work and time
3. java
-- collection: which is sinchonized-- list, set, queue
--
4. reasoning
8 primitive data types in java: Boolean, char, bye, int, short, long, float, double
2. why string is not primitive
3. access specifier
4. difference between default and protected
5. formatters sop("%d %f",3545,546.45)
6. can we store object
7. how to avoid any variable to serialize ???????????????????????????????????????
-------------------------------------------------------------------------------------------
1st round:
written test:
1. manual testing objective questions:
match following with definition -- test plan, test case, test procedure, test objective,requirement
--testing multiple choice more than 1 answer
2. aptitude (10 ques):
-- area between 2 parabola.
-- probability
-- speed and time
-- work and time
3. java
-- collection: which is sinchonized-- list, set, queue
--
4. reasoning
-------------------------------------------------------------------------------------------
2nd round:
Technical interview: core java, database
1. how many primitive data type
2. why string is not primitive
3. access specifier
4. difference between default and protected
5. what is formatters sop("%d %f",3545,546.45)
6. can we store object
7. how to avoid any variable to serialize
-------------------------------------------------------------------------------------------
3rd round:
manager interview(25 mins)
1. where is your comp.
2. what is your work
3. Why you want to join this or why you want to leave
4. how much comfortable in selenium
5. how much you rate yourself in java.
-------------------------------------------------------------------------------------------
4th round:
Director interview (90 min 2 person)
0.1) tell me about yourself
0.2) tell me % in 10th 12th btech
0.3) why they are consistently decreasing
1. where do you work
2. tell me about your project
3. Big client like HP having CRM on windows??(my mistake in resume)
4. i m client i gives you product what question you will ask so that at end you deliver me better
product.
5. what is setup of your automation project
Now problem starts---
6. how ur setup manage your test script fail-- which tool you use
7. how you store test script in server (check in , checkout ???) commit
More questions on real time environment on manual and automation testing