In this article, you are going to see questions that are always asked in Java Automation and Selenium interviews. If you are planning to have your interview then you have every reason to stick to this article till the end so that you can grab what it takes to pass an interview of this kind.
20 Selenium Interview Questions Answers for Beginners and Experienced Developers and Testers
1. What is Automation Testing?
Answer:
Automation testing is a process of automating the manual process to test
the application or system under test.
2. What are the benefits of Automation Testing?
Answer:
- Enables parallel execution
- Facilitates unattended execution
- It saves money and time
- Improves accuracy
3. What is Selenium?
Answer: Selenium is a suite of
tools for web testing and it is composed of WebDriver and RC, Selenium
IDE (Integrated Development Environment) and Grid. Here is a nice
diagram which explains How Selenium works in general:
4. What are the parameters that you have to pass in Selenium?
Answer: the following are the four parameters that you
have to pass in Selenium:
- Host
- Port Number
- Browser
- URL
5. What is the difference between Explicit wait and Implicit wait?
Answer: Explicit wait is a one-timer that is used for a
particular search while Implicit wait sets a timeout for all successive
Web Element searches.
6. What are the limitations of Selenium IDE?
Answer:
- There is no exceptional handling.
- External databases reading is not possible.
- Selenium IDE uses only HTML languages.
- It is not possible to read from the external files.
- Conditional statements execution is also not possible.
7. How can you debug the tests in Selenium IDE?
Answer:
- Insert a break point from the location where you want to execute step by step.
- Run the test case.
- At the particular break point execution will be paused.
- In order to continue with the next step, click on the blue button.
- To run commands at a time click on run button.
8. What are the limitations of Selenium testing?
Answer:
- Unavailability of reliable tech support: Since Selenium is an open-source tool, it does not have dedicated tech support to resolve the user queries.
- Tests web applications only: Selenium needs to be integrated with third-party tools like Appium and TestNG to test desktop and mobile applications.
- Limited support for image testing.
- No built-in reporting and test management facility: Selenium has to be integrated with tools like TestNG, or JUnit among others to facilitate test reporting and management.
- May require the knowledge of programming languages: Selenium WebDriver expects the user to have some basic knowledge about programming.
9. Explain what assertion in Selenium is and what are the types of
assertion?
Answer: Assertion is used as a verification point. It
verifies that the state of the application conforms to what is expected.
The types of assertion are “assert”, “verify” and “waitFor”.
10. What is Object Repository?
Answer: An object
repository is an essential entity in any UI automations which allows a
tester to store all object that will be used in the scripts in one or
more centralized locations rather than scattered all over the test
scripts.
11. Explain how you can insert a breakpoint in Selenium IDE?
Answer: In Selenium IDE to insert a break point:
- Select “Toggle break point” by right click on the command in Selenium IDE.
- Press “B” on the keyboard and select the command in Selenium IDE.
- Multiple breakpoints can be set in Selenium IDE.
12. How you can convert any Selenium IDE tests from Selenese to
another language?
Answer: You can use the format option of Selenium IDE to
convert tests into another programming language.
13. Explain what can cause a Selenium IDE test to fail?
Answer:
- When a locator has changed and Selenium IDE cannot locate the element.
- When element Selenium IDE waiting to access did not appear on the web page and the operation timed out.
- When element Selenium IDE was trying to access was not created.
14. Explain how you can insert a start point in Selenium IDE?
Answer: In two ways selenium IDE can be set
- Press “S” key on the keyboard and select the command in Selenium IDE
- In Selenium IDE right click on the command and the select “Set / Clear Start Point”
15. What is the main difference between webdriver and RC?
Answer: The main difference between Selenium RC and
Webdriver is that, selenium RC injects
Javascript function
into browsers when the page is loaded. On the other hand,
Selenium Webdriver
drives the browser using browsers built in support.
16. What are the advantages of RC?
Answer:
Advantages of RC are:
- Can read or write data from/ to .xls, .txt, etc
- It can handle dynamic objects and Ajax based UI elements
- Loops and conditions can be used for better performance and flexibility
- Support many Programming languages and Operating Systems
- For any JavaScript enabled browser Selenium RC can be used
17. What is IntelliJ?
Answer: Intellij is an IDE
that helps you to write better and faster code for
Selenium. Intellij can be used in the option to Java bean and Eclipse.
18. What ways you can customize TestNG report?
Answer: You can customize TestNG report in two ways,
- Using ITestListener Interface
- Using IReporter Interface
19. Which is the latest Selenium tool?
Answer:
WebDriver
20. How can we get a text of a web element?
Answer:
Get command is used to retrieve the inner text of the specified web
element. The command doesn’t require any parameter but returns a string
value. It is also one of the extensively used commands for verification
of messages, labels, errors, etc displayed on the web pages.
That's all about
frequently asked Selenium Interview questions with answers for Java and Automation Testing engineer. Selenium questions are not stressful as others might be and as of now, you must have already realized that. You have already acquired a gate pass to your success in the Selenium interview that awaits you.
Everything will turn out to be just exactly what you want because you have opened your eyes as far as the questions asked in a selenium interview are concerned.
The ball is now in your court. Go and excel.
- 40+ Object-Oriented Programming Questions with Answers
- 20 Docker Interview Questions with Answers
- 20 Kubernetes Interview Questions with answers
- 15 Cyber Security Interview Questions with Answers
- 20 Software Design and Pattern Questions from Interviews
- 20 PostgreSQL Interview Questions with Answers
- 50+ Microsoft SQL Server Phone Interview questions
- 20 JUnit Interview Questions with Answers
- 25+ Spring Security Interview Questions with Answers
- 20 Algorithms Interview Questions for Software Developers
- 12 SQL Query Interview questions with solutions
- 130+ Java Interview Questions with Answers
- 25 Recursion Interview questions with answers
- 20+ Spring Boot Interview Questions with Answers
- 30 JavaScript Interview Questions with Answers
- 10 Oracle Interview Questions with Answers
- 50 SQL and Database Interview Questions for Beginners
- 17 Spring AOP Interview Questions with Answers
- 35 Python Interview Questions for 1 to 2 years experienced
No comments:
Post a Comment
Feel free to comment, ask questions if you have any doubt.