This post is mainly for people preparing for interviews.
Before posting Selenium Interview questions and answers let me clear that it totally depends on
number of factors.
1- For which position you are applying.
2- Who is taking your interview?
3- For which company you are applying.
4- Does Interviewer’s themselves knows about automation or not?
You must be wondering why I am covering all these factors right. I have taken couple of interviews and
based on my experience I will tell you what questions an Interviewer might ask.
If you are applying for Sr Automation Engg, Lead or Test Manager then be ready with some high-
level topics, which anyways I will be covering in this post.
However, if you are applying as a fresher, then you should be ready with some Java program and some
Selenium related code.
Before getting started keep in mind that there is not hard and fast rule that, the interviewer will ask
questions from a specific domain. It might cover multiple domain/tools.
1- What is Selenium Webdriver, Selenium RC, Selenium IDE and Selenium Grid and which version
you have used?
2-
Ans : Selenium Webdriver : WebDriver is a web automation tool that allows you to execute your
tests against different browsers, not just Firefox (unlike Selenium IDE). It is faster tham the
Selenium RC. Because it directly communicate with browser no need of external server like
Selenium RC.
Selenium IDE : Selenium IDE (Integrated Development Environment) is the simplest tool in the
Selenium Suite. It is a Firefox add-on that creates tests very quickly through its record-and-
playback functionality.
Selenium RC : Selenium Remote Control (RC) is a test tool that allows you to write automated
web application UI tests in any programming language against any HTTP website using any
mainstream JavaScript-enabled browser.
Selenium Grid: Selenium Grid is a part of the Selenium Suite that specializes on running
multiple tests across different browsers, operating systems, and machines in parallel.
************************------------------******************
,3- Can you please explain Selenium Architecture?
4-
************************------------------******************
5- Have you worked on different browsers? Have you ever performed Cross browser testing?
Ans: Yes, I have worked on different browsers like Mozilla (the most common), Chrome, and IE,
performed cross browser testing demo. But while performing cross browser testing in my
automation framework. It was getting slower and data would not be going on to the proper
browser.
Ans- Every month a new browser is coming into market and it became very important to test our
web application on different browser. Selenium supports Cross browser testing. Please check the
detailed article here.
http://learn-automation.com/cross-browser-testing-using-selenium-webdriver/
************************------------------******************
6- What type of test you have automated?
, Ans- Automation mainly focuses on regression testing, smoke testing, Sanity Testing and some
time you can for End to End test cases.
************************------------------******************
5- How many test cases you have automated per day?
Ans- It totally depends on your manual test cases. Sometimes we can automate 3-4 test cases per day
which contain limited operation and some validation. Some test cases may take 1 day or more than one
day as well. It totally depends on test case complexity.
************************------------------******************
6- How to work with Chrome, IE or any other third party driver? Why we need separate driver for them?
Ans- Selenium by default supports only Firefox browser so in order to work with Chrome and IE browser
we need to download separate drivers for them and specify the path.
http://learn-automation.com/launch-chrome-browser-using-selenium-webdriver/
http://learn-automation.com/execute-selenium-script-in-ie-browser/
************************------------------******************
7- Have you created any framework? Which framework you have used?
Ans. Yes. I have created Data-Driven Framework and added some functionalities of Hybrid framework
and Page object model.
************************------------------******************
8- Can you please explainframework architecture?
************************------------------******************
, 9- What is POM (Page Object Model) and what is the need of it?
Ans- Page Object Model Framework has now a days become very popular test automation framework in
the industry and many companies are using it because of its easy test maintenance and reduces the
duplication of code. The main advantage of Page Object Model is that if the UI changes for any page, it
doesn’t require us to change any tests, we just need to change only the code within the page objects (Only
at one place). Many other tools which are using selenium, are following the page object model.
The Page Object model provides the following advantages.
1. There is clean separation between test code and page specific code such as locators (or their use if
you’re using a UI map) and layout.2. There is single repository for the services or operations offered by
the page rather than having these services scattered throughout the tests.
************************------------------******************
10- What are the challenges you have faced while automating your application?
Ans- Challenges faced that are as follows:
Frequently changing UI. It always need to make changes in code most of the time.
Stuck somewhere while running automation scripts in chrome browser getting error that
element is not visible, element not found.
New kind of element like ck-editor, bootstrap calendar and dynamic web tables. But get
the solution always.
Reused of test scripts.
To be continued…….
************************------------------******************
11- What are the different type of exception available in Selenium? Have you faced any exception while
automation?
Ans- Yes. I have faced lots of exception. List are as follows:
1. ElementNotSelectableException
2. ElementNotVisibleException
3. NoSuchAttributeException
4. NoSuchElementException
5. NoSuchFrameException
6. TimeoutException
7. Element not visible at this point
************************------------------******************