Selenium Interview Questions
Making preparation for selenium interviews can be sometimes a hard thing to do especially if you are fresh from school. You might have a problem trying to figure out what might be asked in the interview. Making a prediction of selenium interview questions is not easy, it will need you to find an expert to help you in that, this is the reason why today I will be taking you through samples of related questions and possible answers that are expected. First let’s check on how you will prepare for this interview:
Preparation For Selenium Interview
- Practice selenium test automation-selenium test automation is a field that is not all about theory; you can make it in theory very well and end up knowing nothing about how it works. The employer knows this very well that you might not have it all when it comes to practical, for this reason there might be a small test to prove that you know what you are saying. If you don’t do enough practice you may fail your interview at this stage. So all you should keep in mind is that there will be not only selenium interview questions, there might be practical too.
- Go through java topics- the most expected thing about the interview is that questions will be asked, among these questions there will be a lot of them asking about java as a framework in selenium automation and so you should get familiar with all the topics in java just to be safe when you go to the interview.
- Make sure you understand how programming works-this is because programming is the basics of selenium automation, all the questions that will come your way will be touching on programming, this will help to equip you with the best knowledge.
- Understand different languages that are used in programming-this is the basis of selenium automation.
To go successfully through your selenium interview you will have to understand what exactly goes on at the interview and that is answering questions. Below here I have prepared some selenium interview questions and possible answers that will help you to deal with the interview like a pro. Many employers will not ask you these question orally and you may be required to sit for a small test, which is the exact format I am giving you.
1. What is Selenium ?
This is an open source suite for which is automated used for testing web applications on various browsers.
2. What is the composition of selenium ?
Selenium is composed of Selenium Integrated Development Environment which is a Firefox plug-in used for recording and play back, it is also composed of Web Driver and RC which plays a role in provision of APIs for some programming languages which are included in java which includes PHP among others. Lastly it is composed of the grid that is so important when it comes to distributing tests to run on a number of computers parallel and as a result there is less time used to running the test suites in different browsers.
3. What does assertion do in selenium?
Assertion in selenium helps in verification of the state of an application to make sure that the application is suitable for what it was meant for and it reaches the expectations. There are different types of assertions which include; verify, assert and waifFor.
4. What challenges do face selenium?
Selenium has quite a number of challenges, these may include;
- There is difficulty in maintaining of objects in selenium because there lacks the concept of object respiratory
- Bitmap comparison is not supported by selenium
- Selenium only supports applications that are web based
- Vendor support for tool is not available when you make a comparison with commercial tools like UFT
- Selenium dependant on a third party when it comes to reporting on the capabilities, this can be inconveniencing.
5. Explain the difference between verify and assert.
For assert, first, it permits you to do a check if the element is contained on the page or is unavailable. If there is no assert available when carrying out this check, the process will fail to go on and as a result the whole process will fail.
For verify; after the verify command has finished checking the element on the page is and there is none, the process will still proceed unlike in assert, this is because the use of command in verify will enable the process to go on even after it has failed to find verify.
6. Give the advantages of using selenium.
The advantages of using selenium include;
- The developer community of selenium gets a very huge support from Google
- Selenium supports many operating systems which includes windows, Mac and Linux too
- Selenium has got the x-path which is very powerful when it comes to locating of the elements
- It supports very many common programming languages
7. Why is selenium the best compared to QTP?
Selenium is widely used in the world that QTP because;
- Selenium supports very many programming languages unlike QTP which is tied up to a few, this make selenium the best option because it can just suite in the programming language you know.
- Selenium supports a lot of different browsers on different operating systems unlike QTP which only supports internet explorer which is on windows.
- Selenium is free, which means it is an open source, unlike QTP which is basically commercial, this makes people to go for selenium much because it is cheap
Selenium is specific in its functions, it only tests web based applications, unlike QTP which can test the server application for clients.
8. What is automation testing?
It is the process of automating the manual process of testing applications and systems using the software. It involves the use of tools that enable you to create scripts that execute repeatedly without you having to manually intervene.
9. What advantages does automated testing offer?
The advantages of automated testing are
- Increased the accuracy of testing as incidences of human errors is reduced
- It helps save money and time
- It allows for parallel execution across devices, reducing the time spent in testing
- It allows you to test without the need for supervision
- Allows for repeated execution of test cases
10. What is selenium 2.0 and selenium 3.0?
Selenium RC alone is known as Selenium 1.0.In Selenium 2.0 both Selenium RC and Selenium WebDriver are consolidated into a single tool. Selenium 3.0 is the latest version and currently, two beta versions have been released.
11. What is selenium and what are its components?
Selenium is one of the most suites for automated web testing. Selenium supports a wide range of browsers and platforms and encourages the testing of the functional capabilities of web-based applications. As it is open-source software, it has grown in popularity among testing professionals as a testing tool. It is not just a single tool, but rather a suite of many tools. The suite consists of the following tools
- Selenium Integrated Development Environment: It is a firefox plug that is used as a tool for recording and playback of web applications
- Selenium web driver and selenium remote control: These tools provide APIs for many programming languages like PHP and java. These Softwares are compatible with most of the web browsers.
- Selenium Grid: This is used to concurrently run tests on multiple devices to help reduce the time spent running in-browser test suites.
Webdriver is the latest tool to be developed and released in selenium.
12. What types of testing are supported by selenium?
The Selenium suite supports two types of testing, regression testing, and functional testing.
13. What are the different drivers available in the Selenium web driver?
The different drivers available in selenium webdriver are:
14. What are the various exceptions in Selenium WebDriver?
The various exception in the WebDriver are:
15. What are the different types of wait in Selenium WebDriver and what do they mean?
There are two different types of wait in selenium web driver, they are implicit wait and explicit wait.
- Implicit wait is used to provide a standard wait time between each consecutive test command across the script. Thus each individual step will only be executed after 30 seconds have elapsed after the previous command.
- Explicit wait is used to halt execution until particular criteria have been met or the maximum time allocated has elapsed. Explicit waits are applied for particular instances only.
16. Why is selenium preferred as a testing tool?
The advantages of selenium are
- It supports many programming languages like Python, Pearl, Java, and C#.
- It is an open-source software
- It is free
- It has advanced methods that enable easy location of elements.
- It has a huge user base and many thriving communities that can help you out
- It is compatible over a variety of platforms.
- It is constantly updated along with regular repository developments.
- Its software enables distributed testing to reduce the time needed to test applications.
17. In which ways is selenium limited?
Below are some of the limitations of selenium
- It can only support the testing of web-based applications
- Mobile applications cannot be tested
- It does not support Bitmap comparison, Captcha readers and barcode readers
- Since the software is free and open-source, there is no vendor support that provides users with easy access to help
- As it does not have an object repository concept, management, and maintenance of objects in a hassle.
- Prior programming knowledge is required to use the tool.
18. What are the ways by which you can find an element using selenium?
There are many locators that can be used to find a specific element on the webpage. The various types of locators are
- Link text
- PartialLink text
19. What is X-Path used for?
It is used to find WebElements on your webpage. It is especially useful in identifying dynamic elements on your page. It allows a user to find an element with the reference of another element.
20. What is the difference between the single slash and double slash in XPath?
Single slash or “/” is used to create absolute path expressions. It starts selection from the document node.
Double slash or “//” is used to create relative path expressions. It can start selection anywhere in the document.
21. What is Selenese in selenium?
Selenese is the language used in selenium to write test scripts that are meant to be tested in the selenium IDE.
22. What is the Same origin policy and how should it be handled?
Same origin policy was introduced for security reasons, it prevents the contents of your website from being accessed by scripts from other sites. If you want to handle the same origin policy you can use Selenium Remote Control.
23. What can cause the Selenium IDE to fail?
There are a few instances in with selenium IDE will fail
- When you try to access an element that is yet to be created
- When the locator has been modified and the IDE is no longer able to locate the element
- When the element that the IDE is waiting for does not appear on the webpage and the operation becomes timed out.
Selenium Interview Questions And Answers PDF
You can also download Selenium interview questions and answers pdf from the link below :
Hope the above will help you in preparing for Selenium interviews.