Selenium WebDriver Questions
In this post, we will discuss some frequent Selenium Webdriver questions that may be asked in testing interviews.
What is Selenium?
Selenium automates browsers. It is primarily used for automating web applications for functional testing purposes but is certainly not limited to just that. Selenium has the support of some of the largest browser vendors who have taken or taking steps to make Selenium a native part of their browser.
Selenium is a suite of tools for browser automation. WebDriver provides APIs for browser automation in a wide variety of languages like Java, C#, Python, JS etc and Selenium Grid, which allows tests to run on remote machines simultaneously.
What is a Page Object?
A page object wraps an HTML application page, with an automation-specific API, allowing us to interact, locate and manipulate page elements without the knowledge of the test application HTML code. This gives independence and shields the test code against application UI changes. Also, we can make minimum changes to our test code. Furthermore, you can also provide the page definitions from config parameters, .xml file, YAML file, etc. and build Page objects.
What is Selenium-Grid?
Selenium-Grid allows you to scale your large functional test suites. Grid allows suites to run in multiple environments using hub and nodes.Also, it allows you to run your tests in parallel. Different tests can be run at the same time on different remote machines with different OS and browser combinations. Furthermore, we can have different remote machines supporting and running your tests in them at the same time in parallel.
What is EventFiringWebDriver?
We can use EventFiringWebDriver for customization and debugging Selenium tests. EventFiringWebDriver gives WebDriver capability to fire events. Also, attaching and registering an event listener is simple. In addition, sample code snippet to attach an EventListener to Listen to the events shown below.
API to look:
Look at the above WebDriver API for more details to write a custom listener. The above interface has specifications for beforeX() and afterX() methods. We can provide implementations for these methods.
Selenium WebDriver Tutorials on this website can be found at:
For more details on the Selenium, visit the official website at: