Selenium Interview Questions and Answers




Selenium Interview Questions and Answers Online Training

Enroll Today

Top Selenium Interview Questions and Answers - 2021 [UPDATED]

Are you looking for Selenium Interview Questions and Answers? Than you are at the Right Place. Browse through Popular and Most Asked Interview Questions for Selenium.  There is a Huge Demand for Selenium Professionals in the Market. These Questions are suitable for both Freshers and Experienced Professionals and are based on Trending Topics and as per Current Industry Requirements.

Master These Topics and Increase your Chances in cracking Selenium Interviews like a pro and Secure your Dream Job Today.

Selenium Interview Questions and Answers

  • 22 Questions

Test automation or automation testing is the process of manual process automation to test the system or application under test. Automation testing includes a separate testing tool that helps in developing test scripts to be repeatedly executed and does not need any manual intervention.

The advantages of automation testing include Assist in testing a higher test matrix Increased unattended execution Saves money and time Support implementation of repeated test cases. Allows parallel execution Enhance accuracy to decrease human errors.

Selenium is the collection of automated web testing tools composed of Selenium Integrated Development Environment: It’s one of the important firefox plugin and selenium tools to play and record back. RC and WebDriver: It offers APIs for .NET, Java, PHP, and other languages with different browsers like RC works and Webdriver.

WebDriver and Selenium RC are the web testing tools consolidated in the Selenium 2.0, whereas Selenium 3.0 is the updated version of selenium.

Every control or object in a web page is termed as elements in Selenium. You can find the components in web page easily through the following aspects. ID Tag CSS PartialLink text Name Attribute Link text

There are many advantages of using the Selenium for automation namely Cross-browser: It works on all major browsers like FF, Safari, Chrome, IE, and more. It allows running test script in every browser. Cross-platform: it offers test compatibility across different platforms like Mac OSX, Linux, and Windows. Running the same test scripts is easier on every platform. CLI support: creating a test suite with different test is easier. It can be launched by using a single command. Free help: As it’s a large community, getting support is easier. Ongoing project: Bug fixes and active development on all updated projects. Open-source: There are no requirements for bearing with licensing cost as they are open-source software. Multi-language: It’s easy for choosing any programming language from C#, Python, Ruby, and Java to use with Selenium. Concurrency: It’s easy to implement different tests parallelly with Selenium grid. CI support: Jenkin, one of the best CI tools contains a selenium plugin to initiate tests for execution. Tester-friendly: Automation using selenium can be even done by a non-programmer.

Java JavaScript PHP Python C-Sharp Ruby Perl

Windows Mobile Mac OS X Android Windows Desktop Linux IOS

Regression test cases Sanity test cases End to end test cases Integration tests Functional cases Acceptance tests Smoke tests Cross-browser tests Responsiveness cases

Selenium Exception can be compared to other programming language exceptions. Some of the standard exceptions in Selenium are NoSuchElementException: The exception is used when the element with the provided attributes is not found on the web page. StaleElementException: The exception is used when the element is no longer attached or deleted from the DOM. TimeoutException: The exception is used when a command that uses an operation is not completed at the right time. ElementNotVisibleException: The exception is used when the presented element in the Document Object Model is not visible on the web page.

POM stands for Page Object Model. It’s a design pattern used for creating a repository for the object for web UI elements. Every application’s web page is needed to have its own page class as they are responsible for identifying the WebElements and then perform the operation of those elements on the web.

The benefits of using the Page object Model are Multiple tests can be used on the same repository of the object as the Object repository is idle of test cases. Code reusability Enables for separate flows and operations in the UI from verification. Enhance code readability.

There are no chance to test the window applications Limited reporting is only possible. Handling dynamic elements is not easier. Handling pop windows is not easier There is no chance to test mobile applications. Handling page load is not easier Handling captcha is not easier.

Smoke testing Sanity testing Regression testing

A framework is defined as the best practices or rules that are followed in the best way to achieve the best results. There are many automation frameworks namely Keyword-driven testing framework Behavioral driven framework Data-driven testing framework Hybrid testing framework.

Html name CSS locators Html id Xpath locator

Accessors are used to store the target value in a variable. For example, StoreTitle helps to store the window title in a variable, and storeText is used for storing the text of the targeted element in the variable. Accessors are used to store the result in a variable and also evaluate the results. For example, store TextPresent helps in evaluating the text, whether they in the current window, its true in the case of text is present and false if the text is not present. Store elementPresent is used to evaluate whether the element is the current window. It’s true if it’s present or else stores false.

Reference Section is where the command of description can be seen.

Log Window in Selenium IDE is the area where test execution results are seen.

It can be using the method of text() xPathExpression = //*text()=’username’]

Its a single slash used for creating an Xpath along with an absolute path. Here, the Xpath will make use of the state node in a document as the initial selection. // – it’s a double slash used for creating an Xpath in a relative path. Here, the Xpath can start the selection from all place within the document.