Friday, June 15, 2018

Selenium Interview Question And Answers

Selenium Interview Questions
1. What is Automation Testing?

Automation testing is a process of executing tests using a software tool. The actual outcomes compared with the expected outcomes of the test. The test preconditions setting up, test control and test reporting functions.

2. Name some popular tools for automation testing?

The name of the tools are Selenium, HP UFT, Rational Robot, IBM Rational Functional Tester, etc.

3. Define Selenium?

Selenium is a suite of several testing tools designed for automated web testing.  

4. What are the Selenium suite components?

The Selenium suite package consists of the following components:

i. Selenium RC
ii. Selenium IDE (Integrated Development Environment)
iii. Selenium Webdriver
iv. Selenium Grid

5. Why is Selenium a choice tool for automation testing? 

i. Open source
ii. Supports distributed testing
iii. Regular repository developments
iv. Large user base and support community
v. Platform compatibility for Windows, Mac OS, and Linux, etc. 
vi. Cross browser compatibility for IE, Chrome, Firefox, Safari, etc.
vii. Supports programming languages for Python, C#, Java, Ruby, Perl, etc. 

6. What is the difference between Selenium 1 and Selenium 2?

Selenium RC alone is known as Selenium 1. Selenium RC and WebDriver both are in combination are known as Selenium 2.

7. What are the types of waits available in WebDriver?

Implicit Wait: Implicit waits are used to provide a default waiting time (like 30 sec) between each consecutive test step across the entire test script. The subsequent test step will only execute when the 30 seconds have elapsed after executing the previous test step.

Explicit Wait: Explicit waits are used to halt the execution till the time a particular condition is met or the maximum time has elapsed. Explicit waits are applied for a particular instance only.

8. Where can you use Selenium Grid?

Selenium Grid allows to run multiple instances of Selenium RC in parallel concurrently. It is used to distribute test execution on multiple platforms and environments concurrently.

9. What types of testing are supported by Selenium?

It supports Regression testing and Functional testing.

10. What is assertion in Selenium?

Assertions are used as a verification point in Selenium and verifies that the state of the application is as expected. These are three types: “assert”, “verify” and “waitFor”.

11. What is the limitation of Selenium?

i. It is free, hence no vendor support.
ii. It can not be used to test mobile apps.
iii. Test reports can only be generated using third party tools like JUnit & TestNG.
iv. The user is expected to knowledge of programming.
v. It cannot be used to test Bar code readers  & Captcha.

12. How can you use Selenium to identify an object?

The string locator function “isElementPresent” to find an object using Selenium. It takes a locator as the argument and if found, returns a Boolean.

13. What is a locator?

A locator is an address that uniquely identifies a web element within a web page. Some examples are as Name, ClassName, TagName, CSS Selector, DOM, ID, PartialLinkText, LinkText, Xpath

14. What is a XPath?

XPath is a language that describes a way to locate and process items in Extensible Markup Language (XML) documents. It can also be used to locate HTML elements.

15. What is an Absolute XPath?

Absolute XPath is the direct way to find the elements. A disadvantage is that, XPath gets failed if there are any changes made in the path of the element.

16. What is a Relative XPath?

Relative XPath means that the user can start finding the elements from the middle of the HTML DOM structure and no need to write long XPath.

17. What is single slash (/) and a double slash (//) in XPath?

A single slash (/) is used for creating “XPaths” with absolute paths beginning from the root node.

Double slash (//) is used for creating relative “XPath” to start selection from anywhere within the root node.

18. What is an Object Repository? How is it created in Selenium?

An object repository is used to store web elements of the Application Under Test (AUT) together with their locator values in one or more centralized locations.

19. What is the Selenese?

It is a set of command in Selenium used for running a test.

20. Write the name of types of Selenese?

Accessors: Used for storing the values in a variable.
Actions: Used for performing the interactions and operations with the target elements.
Assertions: Used as a check point.

21. What are Startpoints and Breakpoints in Selenium? 

Startpoints: The point from where the execution should begin. They can be used to run a test script from a breakpoint or the middle of the code.

Breakpoints: The breakpoints are used to stop execution of a code. They help to verify that code is working as expected.

No comments:

Post a Comment