Quality Assurance Interview Questions

Manual Testing

What is SDLC? What are the different stages in SDLC?

SDLC stands for Software Development Lifecycle.

It contains the following phases.

    1. Feasibility Study
    2. Requirements gathering
    3. Design
    4. Coding/Programming/Development
    5. Testing
    6. Implementation or Deployment
    7. Maintenance

Feasibility Study

To analyze the feasibility of a product development/change.

Requirement Phase

Responsible person for this phase is: “Business Analyst (BA)”

  • Gathering Requirements from Client.
  • Objective is to produce a document that specifies all requirements of Client Software.
  • Requirement and Specification (SRS) is the primary output of this phase.
  • Proper requirement and analysis are Critical for having successful project.

Design Phase

Responsible person for this phase is:  System Architect

High Level Design

  • List of modules and a brief description of each module.
  • Interface relationship among modules.
  • Dependencies between modules (if A exists, B exists etc).
  • Database tables identified along with key elements.
  • Overall architecture diagrams along with technology details.

Low Level Design

  • Detailed functional logic of the module, in pseudo code.
  • Database tables, with all elements, including their type and size.
  • All interface details.
  • Complete input and outputs for a module
  • Error message listings

Coding and Unit Testing

Responsible person for this phase is:  Developer/Development Team

  • Detailed Design is required to produce programs in programming Language
  • This stage produces source code, executables, databases etc for appropriate coding standards

Testing Phase

Responsible person for this phase is:  Tester/Testing Team

  • Testing the application to meet the specification and find defects.
  • Smoke, Sanity, Integration, System, Functional testing etc.. Will be conducted.
  • Input Test data and get Test results

Implementation Phase

Responsible person for this phase is:  Operational Team

  • Installation of the product in client environment.

Maintenance Phase

After the software is released and the client starts using the software, maintenance phase will be started.

3 things happen – Bug fixing, Upgrade, Enhancement

  • Bug fixing: bugs arrived due to some untested scenarios.
  • Upgrade: Upgrading the application to the newer versions of the software.
  • Enhancement: Adding some new features into the existing software.

Explain Waterfall Model Process and its advantages and disadvantages?

  • It can be also called as linear sequential modal or classical model.
  • This modal is used for the development of the application in late 1970’s.
  • This is the most economic modal which is used in the development of the software.
  • The main aspect of this modal is,
  1. One task should be completed before starting the other task.
  2. If any error at one stage, the whole process should be started from the beginning. So it becomes the most time lagging process.

Advantages:

  • Simple and easy to understand and use.
  • Phases are processed and completed one at a time.
  • Works well for smaller projects where requirements are very well understood.

Disadvantages:

  • Once an application is in the testing stage, it is very difficult to go back and change something that was not well-thought out in the concept stage.
  • No working software is produced until late during the life cycle.
  • Poor model for long and ongoing projects.
  • Not suitable for the projects where requirements are at a moderate to high risk of changing.

Explain V- Model process and its advantages and disadvantages?

  • V- Model means Verification and Validation model.
  • Just like the waterfall model, the V-Shaped life cycle is a sequential path of execution of processes.
  • Each phase must be completed before the next phase begins.
  • Testing of the product is planned in parallel with a corresponding phase of development.

Advantages:

  • Simple and easy to use.
  • Testing activities like planning, test designinghappens well before coding. This saves a lot of time. Hence higher chance of success over the waterfall model.
  • Proactive defect tracking – that is defects are found at early stage.
  • Works well for small projects where requirements are easily understood.

Disadvantages:

  • Very rigid and least flexible.
  • Software is developed during the implementation phase, so no early prototypes of the software are produced.

Explain Evolutionary Prototyping Model and its advantages and disadvantages?

  • Developers build a prototype during the requirements phase.
  • Prototype is evaluated by end users.
  • Users give corrective feedback.
  • Developers further refine the prototype.
  • When the user is satisfied, the prototype code is brought up to the standards needed for a final product.

Advantages:

  • Users are actively involved in the development
  • Since in this methodology a working model of the system is provided, the users get a better understanding of the system being developed.
  • Errors can be detected much earlier.
  • Quicker user feedback is available leading to better solutions.
  • Missing functionality can be identified easily.

Disadvantages:

  • Leads to implementing and then repairing way of building systems.
  • Practically, this methodology may increase the complexity of the system as scope of the system may expand beyond original plans.

Explain Agile and its advantages and disadvantages?

  • Agile testing is a software testing practice that follows the principles of agile software development.
  • Agile testing involves all members of a cross-functional agile team, with special expertise contributed by testers, to ensure delivering the business value desired by the customer at frequent intervals.
  • Agile development recognizes that testing is not a separate phase, but an integral part of software development, along with coding.
  • Agile teams use a “whole-team” approach to “baking quality in” to the software product.
  • Testers on agile teams lend their expertise in eliciting examples of desired behavior from customers, collaborating with the development team to turn those into executable specifications that guide coding.
  • Testing and coding are done incrementally and iteratively, building up each feature until it provides enough value to release to production.

Stakeholder

  • Someone with an interest in the outcome of a project, either because they have funded it, will use it, or will be affected by it.

Product Owner

  • The person responsible for managing the Product Backlog so as to maximize the value of the project. The Product Owner is responsible for representing the interests of everyone with a stake in the project and its resulting product.

Product Backlog

  • A prioritized list of requirements with estimated times to turn them into completed product functionality. Estimates are more precise the higher an item is in the Product Backlog priority. The list emerges, changing as business conditions or technology changes.

Team

  • A cross-functional group of people that is responsible for managing themselves to develop an increment of product every Sprint.

Sprint

  • Iteration, or one repeating cycle of similar work, that produces increment of product or system. No longer than one month and usually more than one week. The duration is fixed throughout the overall work and all teams working on the same system or product use the same length cycle.

Sprint Backlog

A list of tasks that defines a Team’s work for a Sprint. The list emerges during the Sprint. Each task identifies those responsible for doing the work and the estimated amount of work remaining on the task on any given day during the Sprint.

Daily Scrum

  • A short meeting held daily by each Team during which the Team members inspect their work, synchronize their work and progress and report and impediments to the Scrum Master for removal. Follow-on meetings to adapt upcoming work to optimize the Sprint may occur after the Daily Scrum meetings.

Scrum Master

  • The person responsible for the Scrum process, its correct implementation, and the maximization of its benefits.

Sprint Retrospective meeting

  • A time boxed three-hour meeting facilitated by the Scrum Master at which the complete Team discusses the just-concluded Sprint and determines what could be changed that might make the next Sprint more enjoyable or productive

Advantages:

  • Customer satisfaction by rapid, continuous delivery of useful software.
  • People and interactions are emphasized rather than process and tools. Customers, developers and testers constantly interact with each other.
  • Working software is delivered frequently (weeks rather than months).
  • Face-to-face conversation is the best form of communication.
  • Close daily cooperation between business people and developers.
  • Continuous attention to technical excellence and good design.
  • Regular adaptation to changing circumstances.
  • Even late changes in requirements are welcomed.

Disadvantages:

  • In case of some software deliverables, especially the large ones, it is difficult to assess the effort required at the beginning of the software development life cycle.
  • There is lack of emphasis on necessary designing and documentation.
  • The project can easily get taken off track if the customer representative is not clear what final outcome that they want.
  • Only senior programmers are capable of taking the kind of decisions required during the development process. Hence it has no place for newbie programmers, unless combined with experienced resources.

 

What is SRS Document?

SRS stands for System Requirements Specification document which contains all the requirement documented by BA.

What is White box testing? What are the white box testing techniques?

White Box Testing (also known as Clear Box Testing, Open Box Testing, Glass Box Testing, Transparent Box Testing, Code-Based Testing or Structural Testing) is a software testing method in which the internal structure/design/implementation of the item being tested.

It is done by the developer.

White Box Testing Techniques:

Statement Coverage – Execute all statements at least once

Example: a+b =c

Decision Coverage – Execute each decision direction at least once

Example: If Then Else, Do While, etc

Loop Coverage – Execute each loop at least once

Example: For, Do Until etc…

What is back box testing?

Black Box Testing, also known as Behavioral Testing, is a software testing method in which the internal structure/design/implementation of the item being tested is not known to the tester.

It is done by Tester.

What is Smoke testing?

  • Smoke testing is the initial testing process exercised to check whether the software under test is ready/stable for further testing.
  • Prior to start Smoke testing few test cases need to created once to use for smoke testing. These test cases are executed prior to start actual testing to check critical functionalities of the program is working fine.
  • This set of test cases written such a way that all functionality is verified but not in deep.

What is Sanity testing?

  • Always done on tested build.
  • Major functionality is checked in depth, this test is narrow and deep.
  • Subset of Regression Testing.

What is System testing?

System testing of software is testing conducted on a complete, integrated system (application as a whole) to check whether it satisfies client requirement.

What is Regression testing?

Re-testing the application after fixing the issue and also ensure that fixing this issue should not affect any other functionality in the application.

What is Retesting?

Testing the fixed defects will be called as Retesting.

What is GUI testing?

  • GUI testing is a process to test application’s user interface and to detect if application is functionally correct.
  • Handles keyboard and mouse events, how different GUI components like menu bars, toolbars, dialogs, buttons, edit fields, list controls, images etc.
  • Reacts to user input and whether or not it performs in the desired manner.

What is Concurrency Testing?

Multi-user testing geared towards determining the effects of accessing the same application code, module or database records.

API Interview Questions

What is an API?

  • API is an acronym and it stands for Application Programming Interface.
  • API is a set of routines, protocols, and tools for building Software Applications.
  • APIs specify how one software program should interact with other software programs.
  • API acts as an interface between two software applications and allows the two software applications to communicate with each other.
  • API is a collection of software functions that can be executed by another software program.

What is API Testing?

API testing is a type of software testing that involves testing APIs directly and also as a part of integration testing to check whether the API meets expectations in terms of functionality, reliability, performance, and security of an application.

In API Testing our main focus will be on the Business logic layer of the software architecture. API testing can be performed on any software system which contains multiple APIs.

Difference between API and Web services?

Web services:

All web services are APIs
2. All web services need to be exposed over web(HTTP)
3. A Web service uses only three styles of use: SOAP, REST and XML-RPC for communication
4. A Web service always needs a network to operate

APIs:

All APIs are not web services
2. All APIs need not be exposed over web(i.e. HTTP)
3. API uses multiple ways for communication e.g. DLL files in C/C++, Jar files/ RMI in java, Interrupts in Linux kernel API etc.
4. APIs don’t need a network for operation

What is Soap?

SOAP stands for Simple Object Access Protocol. It is an XML based messaging protocol. It helps in exchanging information among computers.

What is Rest API?

REST stands for Representational State Transfer. It is a set of functions helping developers in performing requests and receive responses. Interaction is made through HTTP Protocol in REST API.

Difference between SOAP and REST?

SOAP:
1. SOAP is a protocol through which two computers communicate by sharing XML document
2. SOAP supports only XML format
3. SOAP does not support caching
4. SOAP is slower than REST
5. SOAP is like a custom desktop application, closely connected to the server
6. SOAP runs on HTTP but envelopes the message

REST:
1. REST is a service architecture and design for network-based software architecture
2. REST supports different data formats
3. REST supports caching
4. REST is faster than SOAP
5. REST client is just like a browser and uses standard methods An application has to fit inside it
6. REST uses the HTTP headers to hold meta information

What are the common tests that are performed on APIs?

Some of the common tests we perform on APIs are as follows.

  1. Verify whether the return value is based on the input condition. The response of the APIs should be verified based on the request
  2. Verify whether the system is authenticating the outcome when the API is updating any data structure
  3. Verify whether the API triggers some other event or request another API
  4. Verify the behaviour of the API when there is no return value

What are the advantages of API Testing?

  • API Testing is time effective when compared to GUI Testing. API test automation requires less code so it can provide faster and better test coverage.
  • API Testing helps us to reduce the testing cost. With API Testing we can find minor bugs before the GUI Testing. These minor bugs will become bigger during GUI Testing. So finding those bugs in the API Testing will be cost-effective to the Company.
  • API Testing is language independent.
  • API Testing is quite helpful in testing Core Functionality. We can test the APIs without a user interface. In GUI Testing, we need to wait until the application is available to test the core functionalities.
  • API Testing helps us to reduce the risks.

What exactly needs to be verified in API Testing?

Basically, on API Testing, we send a request to the API with the known data and we analyse the response.

1. Data accuracy
2. HTTP status codes
3. Response time
3. Error codes in case API return any errors
4. Authorization checks
5. Non-functional testing such as performance testing, security testing

List some most used templates for API documentation?

Some of the API documentation templates are as follows.

  • Swagger
  • FlatDoc
  • RestDoc
  • API blueprint
  • Slate
  • Miredot

Web service API Specification

Name some most commonly used HTTP methods?

Some of the HTTP methods are

GET: It enables you to retrieve data from a server
POST: It enables you to add data to an existing file or resource in a server
PUT: It lets you replace an existing file or resource in a server
DELETE: It lets you delete data from a server
PATCH: It is used to apply partial modifications to a resource
OPTIONS: It is used to describe the communication options for the target resource
HEAD: It asks for a response identical to that of a GET request, but without the response body

What is the difference between PUT and POST methods?

  • PUT and POST methods are sometimes confused in regards to when each should be used. Using POST request, our intent is to create a new object on the server whereas with PUT request, our intent is to replace an object by another object.
  • POST should be used when the client sends the page to the server and then the server lets the client know where it put it. PUT should be used when the client specifies the location of the page

Explain the API testing approach.

Mentioned below are the factors which determine the approach:

  • Write appropriate test cases for the APIs and use testing techniques like boundary value analysis, equivalence class, etc. for verifying the functionality.
  • Verify the calls of the combination of two or more value-added parameters.
  • Define the scope and basic functionality of the API program.
  • Define the accurate input parameters.
  • Test case execution and comparison of the results with expected results.
  • Determining API behaviour under conditions like the connection with files, etc.

What is Resource in REST?

REST architecture treats any content as resource, which can be text files, HTML pages, images, videos or dynamic business information.

REST server gives the functionality to access the resources and modifies them. We can identify the each resources by URIs/ global IDs.

What is the way to represent the resource in REST?

REST uses different representation to define the resources like text, JSON and XML. The most popular representation of resources is JSON and XML.

What is URI? What is the purpose of web-based service and what is its format?

URI stands for Uniform Resource Identifier. It is a string of characters designed for unambiguous identification of resources and extensibility by the URI scheme.

The purpose of URI is to locate the resource on the server hosting of the web service.

What is UDDI?

Universal Description, Discovery and Integration- a directory or global repository where all the web services can be found.

A new Webservice can also be registered through this. This is also the place where WSDL detailed definitions are found.

It uses the discovery layer which is used in the web services. UDDI has all the information about the web services in detail.

Webservice is Stateful or Stateless – REST, SOAP?

Webservice is Stateless but can be Stateful.

Stateful is, storing client information on server and apply it in future client requests. resulting in dependency of present request on to previous request, which can be put in practice with http protocols.

SOAP can be Stateless and Stateful and REST is Stateless.

What is SOAP UI?

SOAP UI is a free, open-source cross-platform functional Testing solution.

It enables you to rapidly and easily create and execute automated regression, compliance, functional and load tests. Its used for Web Services Testing.

What hierarchy does SoapUI follow to build a proper testing project?

  • Project– Project is highest level in the hierarchy
  • TestSuite – This is combination of functional tests and logical blocks
  • Testcase – It’s a group that contains several test steps for the specific aspects of the service.
  • Teststep – it contains the set of functional tests

What is the basic method to automate web services in SoapUI?

  • Create a project
  • Add test suites, Test cases and Test Steps
  • Include custom programming/validation using by adding Groovy steps
  • Call external data sources if using
  • Add assertions if necessary
  • Then RUN

What are SoapUI assertions?

Assertions compare the parts/all of the response message to the expected outcome.

What are the major types of assertions available in SoapUI?

Assertions are one of the major features in SoapUI. It offers the following types of assertions.

  • Contains
  • Schema compliance
  • Not contain
  • Soap Faults
  • Response SLA
  • XPath Match
  • XQuery Match
  • JSON Path
  • JSON Path Match
  • JSON Path Count
  • JSON Path
  • Valid HTTP Status Code
  • SLA

How can assertions be added in SoapUI?

Receive a response to a request as you normally would follow the below steps:

  • Create a project, add WSDL
  • Add Test suite, Test case and Test steps
  • Run the request

To add assertions:
– Click on the Add Assertions at the top of log tabs.
– Configure the assertions as per the type and data required.

What is Groovy script and where can it be used?

Groovy is a scripting language which internally includes all the Java libraries – it helps us to customize and add custom validations to SoapUI tests.

How to group tests?

The basic Test suite is a way for us to group tests in SoapUI. When you need a different set of tests, you just have to create a new test suite and create tests as required under it as test cases.

What are the properties available in SoapUI?

In SoapUI, there are 5 levels of properties available. They are,

  • Global
  • Project
  • Test Suite
  • Test Case
  • Test Step

Explain the Xpath Assertion in SoapUI?

It is used to assert the web service response by giving the absolute path. If this path is corresponding with the response, the test case will be considered as PASS else it will be informed as FAILED. We can see the outcomes of assertion at the end of the screen and the Assertion tab has resultant information there.

What is the overall Format to read Default/ Custom PropertyValue?

${#levelname#key}

How can you access project name from Groovy Script Test Step?

testRunner.testCase.testSuite.project.name

What is the purpose of SOAP UI Mock Service?

A Mock service is an important feature of the SoapUI testing tool. It creates a dummy or virtual web service that simulates a response to a web service request. The mocking service creates a virtual environment to test the web service that works similarly to real service.

Name some of Http Status Codes/messages?

  • 200 OK- Indicates that request was positive.
  • 201 Created – The request was positive and a resource was created
  • 400 Bad Requests – Request malformed. The data did not pass validation or has the wrong format.
  • 404 Not Found – Required resource is not found.
  • 401 Unauthorized – Authentication is required before accessing the source.
  • 405 Method Not Allowed – HTTP method is not supported for the resource.
  • 409 Conflicts – Use of PUT request for creation of same resource twice etc.
  • 500 Internal Server Errors – Processing failed due to surprising conditions on the server-side.

What is the purpose of property transfer in Soap UI?

Property transfer serves the purpose of extracting a specified value from a response and transfers it to the other elements in a project.

JIRA

What is JIRA?

JIRA is an issue tracking product developed by Atlassian which allows bug tracking and agile project management.

Can Jira be used for test case management?

Although JIRA was not designed to serve as a Test Case Management, it can be configured to support test case management in two different ways.
You can either change native components in JIRA to meet test case management needs or you can use one of the add-ons available in Atlassian Marketplace (Example: Zephyr /XRAY of JIRA)

Explain Jira workflow.

Jira workflow is a set of activities performed to track and transition of an issue during the lifecycle of an issue where transition represents the link between the two statuses when an issue moves from one status to another status, and status determines the impact of the work on an issue filed by the tester.

What is an issue in JIRA?

Different organizations use JIRA to track various types of issues, which can represent anything from a software bug, to a project task, or a leave request form.
Issues are the building blocks of any JIRA project. An issue could represent a story, a bug, a task, or another issue type in your project.

How is an issue linked in JIRA?

Linking means establishing the relationship between the two. In JIRA, an issue can be linked with other issues on either the same or different JIRA servers.
An issue can be linked with other issues as follows
1. An issue may relate to another issue
2. An issue may duplicate another issue
3. An issue may block another issue

What are the issues types in JIRA?

Each Jira application comes with default issue types. You can use these default issue types or create your own to suit the needs of your projects and teams.
Here’s an example of specific issue types within each Jira application:
Jira Core default issue types:
• Task – Task that needs to be done
• Subtask – Smaller task within a larger piece of work

Jira Software default issue types
• Story – Functionality request expressed from the perspective of the user
• Bug – Problem that impairs product or service functionality
• Epic – Large piece of work that encompasses many issues

What is Cloning an Issue in JIRA?

Cloning, or copying, an issue lets you quickly create a duplicate of an issue within the same project. The clone issue is a replica of the original issue, containing the same information stored in the original issue — e.g. Summary, Affects Versions, Components, and so on. The clone issue can likewise be connected to the original issue.
A clone issue is a different entity from the original issue. Tasks of the original issue has no impact on the cloned issue and vice versa.

A clone issue retains the following information:
• Summary
• Description
• Assignee
• Environment
• Priority
• Issue Type etc.,

What is a Sub-task in JIRA?

Sub-task is the way of splitting up a parent issue into a number of smaller tasks that can be assigned and tracked separately. All the sub-tasks to a parent issue are summarised on the parent issue’s main screen. Sub-tasks always belong to the same project as their parent issue.

How is a sub-task created in JIRA?

1. Navigate to the issue you would like to be the parent issue of the sub-task you are about to create.
2. Select More > Create Sub-Task. You will see the Create Subtask screen.
3. Fill in the details as needed, and then click Create at the bottom of the page.

How to delete a component in JIRA?

To delete a component in JIRA,
1. Navigate to components screen, hover over the relevant component to display the Delete button.
2. You will be prompted to connect these issues with another component if you wish.

What are the Version control systems we can integrate with JIRA?

JIRA can be integrated with version control systems such as Git, Subversion, Visual SourceSafe, etc.,

Explain how you can edit multiple issues at the same time?

Editing multiple issues at the same time can be done by performing a bulk operation. To perform this bulk operation, you will need the global Make bulk changes permission and the relevant permission for each project.

What is Zephyr/Xray for Jira?

Zephyr/Xray for JIRA is an add-on application that provides highly sophisticated test management capabilities right inside JIRA.

What is the importance of JIRA Dashboard? How to create a new Dashboard or customize the existing dashboard in Jira?

A dashboard is the first page you can see when you logged in to the JIRA application.
This is a default dashboard that is common for all JIRA users but you can create your own dashboard as per your requirement.
You can design your personal dashboard by adding different gadgets.

What is a Scrum board in JIRA?

A Scrum board in JIRA is a board that was created using the Scrum preset. If a team is planning to work in sprints then Scrum board is suitable for them.

Explain Scrum board?

The Scrum Board is a physical board on which the user stories present in the current sprint backlog are displayed.

Define a component in Jira?

Components are the subdivisions of a project and used to group the issues within a project into smaller parts.

Define a component in Jira?

Components are the subdivisions of a project and used to group the issues within a project into smaller parts.

  • Click on the ‘…’ icon then the dropdown appears which shows two options, i.e., Edit and Delete.
  • Click on the Delete option to delete the component from the Jira project.

Selenium Interview Questions

What is Selenium?

Selenium is a portable framework for testing web applications. Selenium provides a playback   tool for authoring functional tests without the need to learn a test scripting language.

What is Selenium IDE?

IDE records multiple locators for each element it interacts with. If one locator fails during playback, the others will be tried until one is successful.

Where is XPath used in?

XPath is a technique in Selenium to navigate through the HTML structure of a page. XPath enables testers to navigate through the XML structure of any document, and this can be used on both HTML and XML documents.

What does the term DOM refer to?

In short, the Document Object Model (DOM) is the way how HTML elements are structured.

What does the assertTitle checks?

assertTitle gets the title of a website and checks it against the provided text.

The command which is used to pause execution until the specified element becomes present?

“WaitForElementPresent” command will pause selenium until targeted element not present on the page. Once element will appear on the page, selenium will go for executing next command.

Which method is used when you want to verify whether a certain checkbox, radio button, or option in a drop-down box is selected in Web driver Selenium?

IsSelected( ) is the Selenium WebDriver Predefined Method, which is used to get the status of the radio buttons and check box options. IsSelected( )

predefined method returns true if the radio button or the check box is selected else it will return false.

Which Component is used to run multiple tests simultaneously in different browsers and platforms?

Selenium Grid is a part of the Selenium Suite that specializes in running multiple tests across different browsers, operating systems, and machines in parallel. It is achieved by routing the commands of remote browser instances where a server acts as a hub.

The method which clears all selected entries in Web driver Selenium?

deselectAll () method is useful to remove selection from all selected options of select box. It will works with multiple select box when you need to remove all selections.

Method which selects the option which displays the text matching the parameter passed to it?

SelectByVisibleText( ) command can also be used to select a list option from the Drop Down field using its Label Text.

The command which retrieves the alert message and stores it in a variable that you will specify?

“storeAlert” command will read the alert text and store it in specified variable and then it will close the alert popup.

What are the different types of locators in Selenium?

The locator can be termed as an address that identifies a web element uniquely within the webpage. Thus, to identify web elements accurately and precisely we have different types of locators in Selenium:

  • ID
  • ClassName
  • Name
  • TagName
  • LinkText
  • PartialLinkText
  • Xpath
  • CSS Selector
  • DOM

What is the difference between assert and verify commands?

Assert: Assert command checks whether the given condition is true or false. Let’s say we assert whether the given element is present on the web page or not. If the condition is true then the program control will execute the next test step but if the condition is false, the execution would stop and no further test would be executed.

Verify: Verify command also checks whether the given condition is true or false. Irrespective of the condition being true or false, the program execution doesn’t halt i.e. any failure during verification would not stop the execution and all the test steps would be executed.

What is an XPath?

XPath is used to locate a web element based on its XML path. XML stands for Extensible Markup Language and is used to store, organize and transport arbitrary data. It stores data in a key-value pair which is very much similar to HTML tags. Both being markup languages and since they fall under the same umbrella, XPath can be used to locate HTML elements.

The fundamental behind locating elements using XPath is the traversing between various elements across the entire page and thus enabling a user to find an element with the reference of another element.

What is the difference between “/” and “//” in Xpath?

Single Slash “/” – Single slash is used to create Xpath with absolute path i.e. the xpath would be created to start selection from the document node/start node.

Double Slash “//” – Double slash is used to create Xpath with relative path i.e. the xpath would be created to start selection from anywhere within the document.

When should I use Selenium Grid?

Selenium Grid can be used to execute same or different test scripts on multiple platforms and browsers concurrently so as to achieve distributed test execution, testing under different environments and saving execution time remarkably.

How do I launch the browser using WebDriver?

The following syntax can be used to launch Browser:

WebDriver driver = new FirefoxDriver();
WebDriver driver = new ChromeDriver();
WebDriver driver = new InternetExplorerDriver();

What are the different types of Drivers available in WebDriver?

The different drivers available in WebDriver are:

  • FirefoxDriver
  • InternetExplorerDriver
  • ChromeDriver
  • SafariDriver
  • OperaDriver
  • AndroidDriver
  • IPhoneDriver
  • HtmlUnitDriver

How to type in a textbox using Selenium?

The user can use sendKeys(“String to be entered”) to enter the string in the textbox.

Syntax:
WebElement username = drv.findElement(By.id(“Email”));
// entering username
username.sendKeys(“sth”);

How can you find if an element in displayed on the screen?

WebDriver facilitates the user with the following methods to check the visibility of the web elements. These web elements can be buttons, drop boxes, checkboxes, radio buttons, labels etc.

  • isDisplayed()
  • isSelected()
  • isEnabled()

Syntax:

isDisplayed():
boolean buttonPresence = driver.findElement(By.id(“gbqfba”)).isDisplayed();

isSelected():
boolean buttonSelected = driver.findElement(By.id(“gbqfba”)).isSelected();

isEnabled():
boolean searchIconEnabled = driver.findElement(By.id(“gbqfb”)).isEnabled();

How can we get a text of a web element?

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.

Syntax:
String Text = driver.findElement(By.id(“Text”)).getText();

How to select value in a dropdown?

The value in the dropdown can be selected using WebDriver’s Select class.

Syntax:

selectByValue:
Select selectByValue = new Select(driver.findElement(By.id(“SelectID_One”)));
selectByValue.selectByValue(“greenvalue”);

selectByVisibleText:
Select selectByVisibleText = new Select (driver.findElement(By.id(“SelectID_Two”)));
selectByVisibleText.selectByVisibleText(“Lime”);

selectByIndex:
Select selectByIndex = new Select(driver.findElement(By.id(“SelectID_Three”)));
selectByIndex.selectByIndex(2);

What are the different types of navigation commands?

Following are the navigation commands:
navigate().back() – The above command requires no parameters and takes back the user to the previous webpage in the web browser’s history.

Sample code:
driver.navigate().back();

navigate().forward() – This command lets the user to navigate to the next web page with reference to the browser’s history.

Sample code:
driver.navigate().forward();

navigate().refresh() – This command lets the user to refresh the current web page there by reloading all the web elements.

Sample code:
driver.navigate().refresh();

navigate().to() – This command lets the user to launch a new web browser window and navigate to the specified URL.

Sample code:
driver.navigate().to(“https://google.com”);

How to click on a hyper link using linkText? driver.findElement(By.linkText(“Google”)).click();

The command finds the element using link text and then click on that element and thus the user would be re-directed to the corresponding page.

The above-mentioned link can also be accessed by using the following command.

driver.findElement(By.partialLinkText(“Goo”)).click();

The above command finds the element based on the substring of the link provided in the parenthesis and thus partialLinkText() finds the web element with the specified substring and then clicks on it.

How to handle frame in WebDriver?

An inline frame acronym as iframe is used to insert another document within the current HTML document or simply a web page into a web page by enabling nesting.

Select iframe by id
driver.switchTo().frame(“ID of the frame“);

Locating iframe using tagName
driver.switchTo().frame(driver.findElements(By.tagName(“iframe”).get(0));

Locating iframe using index

frame(index)
driver.switchTo().frame(0);

Locating iframe using Name

frame(Name of Frame)
driver.switchTo().frame(“name of the frame”);

Select Parent Window
driver.switchTo().defaultContent();

How to find more than one web element in the list?

At times, we may come across elements of the same type like multiple hyperlinks, images etc arranged in an ordered or unordered list. Thus, it makes absolute sense to deal with such elements by a single piece of code and this can be done using WebElement List.

Sample Code

// Storing the list

List <WebElement>elementList = driver.findElements(By.xpath(“//div[@id=’example’]//ul//li”));

// Fetching the size of the list

int listSize = elementList.size();

for (int i=0; i<listSize; i++)

{

// Clicking on each service provider link

serviceProviderLinks.get(i).click();

// Navigating back to the previous page that stores link to service providers

driver.navigate().back();

}

When do we use findElement() and findElements()?

findElement(): findElement() is used to find the first element in the current web page matching to the specified locator value. Take a note that only first matching element would be fetched.

Syntax:

WebElement element = driver.findElements(By.xpath(“//div[@id=’example’]//ul//li”));
findElements(): findElements() is used to find all the elements in the current web page matching to the specified locator value. Take a note that all the matching elements would be fetched and stored in the list of WebElements.

Syntax:
List <WebElement>elementList = driver.findElements(By.xpath(“//div[@id=’example’]//ul//li”));

What is the difference between driver.close() and driver.quit command?

close(): WebDriver’s close() method closes the web browser window that the user is currently working on or we can also say the window that is being currently accessed by the WebDriver. The command neither requires any parameter nor does it return any value.

quit(): Unlike close() method, quit() method closes down all the windows that the program has opened. Same as close() method, the command neither requires any parameter nor does is return any value.

How to mouse hover on a web element using WebDriver?

WebDriver offers a wide range of interaction utilities that the user can exploit to automate mouse and keyboard events. Action Interface is one such utility which simulates the single user interactions.

Thus, In the following scenario, we have used Action Interface to mouse hover on a drop down which then opens a list of options.

Sample Code:

// Instantiating Action Interface

Actions actions=new Actions(driver);

// howering on the dropdown

actions.moveToElement(driver.findElement(By.id(“id of the dropdown”))).perform();

// Clicking on one of the items in the list options

WebElementsubLinkOption=driver.findElement(By.id(“id of the sub link”));

subLinkOption.click();

How to retrieve CSS properties of an element?

The values of the css properties can be retrieved using a get() method:

Syntax:
driver.findElement(By.id(“id“)).getCssValue(“name of css attribute”);
driver.findElement(By.id(“id“)).getCssValue(“font-size”);

How can we type text in a textbox element using Selenium?

With the help of sendKeys() method we can type text in a textbox-

WebElementsearchTextBox = driver.findElement(By.id(“srch”));

searchTextBox.sendKeys(“searchTerm”);

How can we submit a form in Selenium?

Using the submit() method we can submit a form in selenium.

driver.findElement(By.id(“form1”)).submit();

Also, the click() method can be used for the same purpose.

How can we maximize the browser window in Selenium?

We can maximize the browser window using the following command-

driver.manage().window().maximize();

How can we fetch a text written over an element?

Using the getText() method we can fetch the text over an element.

String text = driver.findElement(“elementLocator”).getText();

How can we find the value of different attributes like name, class, value of an element?

Using getAttribute(“{attributeName}”) method, we can find the value of different attributes of an element

Code:

String valueAttribute =

driver.findElement(By.id(“locator”)).getAttribute(“value”);

How to delete cookies in Selenium?

Using deleteAllCookies() method.

Code:

driver.manage().deleteAllCookies();

What is an implicit wait in Selenium?

An implicit wait is a type of wait that waits for a specified time while locating an element before throwing NoSuchElementException. By default, Selenium tries to find web elements immediately when required without any wait. So, it is good to use implicit wait. This wait is applied to all the elements of the current driver instance.

Code:

driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);

What is an explicit wait in Selenium?

An explicit wait is a type of wait that is applied to a particular web element until the expected condition specified is met.

Code:

WebDriverWait wait = new WebDriverWait(driver, 10);

WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id(“element

It is advisable to use explicit waits over implicit waits because higher timeout value of implicit wait (set for handling only some of the elements) gets applied to all the web elements. Thus increasing the overall execution time of the script. On the other hand, we can apply different timeouts to the different elements in case of explicit waits.

What is a fluent wait?

A fluent wait is a type of wait in which we can also specify polling interval (the time intervals after which driver will try to find the elements when not located) along with the maximum timeout value.

 Code:

Wait wait = new FluentWait(driver)

.withTimeout(20, SECONDS)

.pollingEvery(5, SECONDS)

.ignoring(NoSuchElementException.class);

WebElementtextBox = wait.until(new Function<webdriver,webElement>() {

public WebElementapply(WebDriver driver) {

return driver.findElement(By.id(“textBoxId”));}

What are the different keyboard operations that can be performed in Selenium?

The different keyboard operations that can be performed in Selenium are-

.sendKeys(“sequence of characters”) – Used for passing character sequence to an input or textbox element.

.pressKey(“non-text keys”) – Used for keys like control, function keys etc that are non-text.

.releaseKey(“non-text keys”) – Used in conjunction with keypress event to simulate releasing a key from keyboard event.

What are the different mouse actions that can be performed using Selenium?

The different mouse events supported in Selenium are-

  • click(WebElement element)
  • doubleClick(WebElement element)
  • contextClick(WebElement element)
  • mouseDown(WebElement element)
  • mouseUp(WebElement element)
  • mouseMove(WebElement element)
  • mouseMove(WebElement element, long xOffset, long yOffset)

Write the code to double-click an element.

Code to double click an element

Actions action = new Actions(driver);

WebElement element=driver.findElement(By.id(“elementId”));

action.doubleClick(element).perform();

Write the code to right-click an element.

Code to right-click an element in selenium-

Actions action = new Actions(driver);

WebElement element=driver.findElement(By.id(“elementId”));

action.contextClick(element).perform();

How to fetch the current page URL in Selenium?

In order to fetch the current page URL, we can use the getCurrentURL() command.

Code:

driver.getCurrentUrl();

How can we fetch the title of the page in Selenium?

Using driver.getTitle() command, we can fetch the page title in Selenium. This method returns a string containing the title of the webpage.

How can we fetch the page source in Selenium?

Using the driver.getPageSource() command, we can fetch the page source in selenium. This method returns a string containing the page source.

How to verify tooltip text using Selenium?

Tooltips web elements have an attribute of type ‘title’. By fetching the value of the ‘title’ attribute, we can verify the tooltip text in selenium.

Code:

String toolTipText = element.getAttribute(“title”);

What are DesiredCapabilities in Selenium WebDriver?

Desired capabilities are a set of key-value pairs that are used for storing or configuring browser-specific properties. For example – browser’s version, platform, etc in the browser instances.

How can we find all the links on a web page?

All the links are of anchor tag ‘a’. So by locating elements of tagName ‘a’ we can find all the links on a webpage.

Code:

List<WebElement> links = driver.findElements(By.tagName(“a”));

What are some commonly encountered exceptions in Selenium?

Some of the commonly seen exceptions in Selenium are-

NoSuchElementException – When no element could be located by the locator provided.

ElementNotVisibleException– When an element is present in the DOM but is not visible.

NoAlertPresentException – When we try to switch to an alert box but the targetted alert is not present.

NoSuchFrameException– When we try to switch to a frame but the targetted frame is not present.

NoSuchWindowException – When we try to switch to a window but the targetted window is not present.

UnexpectedAlertPresentException– When an unexpected alert blocks the normal interaction of the driver.

TimeoutException– When a command execution gets a timeout.

InvalidElementStateException – When the state of an element is not appropriate for the desired action.

NoSuchAttributeException– When we are trying to fetch an attribute’s value but the attribute is not correct.

WebDriverException– When there is some issue with the driver instance preventing it from getting launched.

What are some expected conditions that can be used in Explicit waits?

Some of the commonly used expected conditions of an element that can be used with explicit waits are-

  • elementToBeClickable(WebElement element or By locator)
  • stalenessOf(WebElement element)
  • visibilityOf(WebElement element)
  • visibilityOfElementLocated(By locator)
  • invisibilityOfElementLocated(By locator)
  • attributeContains(WebElement element, String attribute, String value)
  • alertIsPresent()
  • titleContains(String title)
  • titleIs(String title)
  • textToBePresentInElementLocated(By, String)

How can we check if an element is getting displayed on a web page?

Using the isDisplayed() method we can check if an element is getting displayed on a web page.

Code:

driver.findElement(By locator).isDisplayed();

How to handle the HTTPS website in Selenium or how to accept the SSL untrusted connection?

Using profiles, we can handle accept the SSL untrusted connection certificate. Profiles are basically set of user preferences stored in a file.

Code:

FirefoxProfile profile = new FirefoxProfile();

profile.setAcceptUntrustedCertificates(true);

profile.setAssumeUntrustedCertificateIssuer(false);

WebDriver driver = new FirefoxDriver(profile);

How to do drag and drop in Selenium?

Using Action class, drag and drop can be performed in Selenium.

Code:

Actions builder = new Actions(driver);

Action dragAndDrop = builder.clickAndHold(SourceElement)

.moveToElement(TargetElement)

.release(TargetElement)

.build();

dragAndDrop.perform();

How to handle alerts in Selenium?

In order to accept or dismiss an alert box, the alert class is used. This requires first switching to the alert box and then using accept() or dismiss() command as the case may be.

Alert alert = driver.switchTo().alert();

//To accept the alert

alert.accept();

Alert alert = driver.switchTo().alert();

//To cancel the alert box

alert.dismiss();

What is HtmlUnitDriver?

Ans. HtmlUnitDriver is the fastest WebDriver. Unlike other drivers (FireFoxDriver, ChromeDriver, etc), the HtmlUnitDriver is non-GUI. On executing test scripts, no browser gets launched.

How to handle hidden elements in Selenium WebDriver?

Using javaScript executor we can handle hidden elements

Code:

(JavascriptExecutor(driver))

.executeScript(“document.getElementsByClassName(locator).click();”);

What is Page Object Model or POM?

Page Object Model(POM) is a design pattern in Selenium. A design pattern is a solution or a set of standards that are used for solving commonly occurring software problems.

Now coming to POM – POM helps to create a framework for maintaining selenium scripts. In POM for each page of the application, a class is created having the web elements belonging to the page and methods handling the events on that page. The test scripts are maintained in separate files and the methods of the page object files are called from the test scripts file.

In this way, we can create a robust automation framework using POM.

What is Page Factory?

Page factory is an implementation of the Page Object Model in Selenium. It provides @FindBy annotation to find web elements. In addition, there is a PageFactory.initElements() method to initialize all web elements defined with @FindBy annotation.

public class SamplePage {

WebDriver driver;

@FindBy(id=”search”)

WebElementsearchTextBox;

@FindBy(name=”searchBtn”)

WebElementsearchButton;

//Constructor

public samplePage(WebDriver driver){

this.driver = driver;

//initElements method to initialize all elements

PageFactory.initElements(driver, this);

}

//Sample method

public void search(String searchTerm){

searchTextBox.sendKeys(searchTerm);

searchButton.click();

}

}

What is an Object repository?

An object repository is the centralized location of all the objects or WebElements of the test scripts. In Selenium, we can implement an object repository using the Page Object Model as well as Page Factory design patterns.

What is a data-driven framework?

A data-driven framework is one in which the test data is put in external files like CSV, Excel, etc. Basically, the test data is separated from the test logic that is written in test script files. The test data drives the test cases, i.e. the test methods run for each set of test data values.

What is a hybrid framework?

A hybrid framework is a combination of two or more frameworks. For example, a combination of data-driven and keyword-driven frameworks can be considered as a hybrid framework.

What is a keyword-driven framework?

A keyword-driven framework is one in which the normal set of actions are associated with keywords and are kept in external files usually in tabular form.

For example, an action of launching a browser will be associated with keyword – launchBrowser(), action to write in a textbox with keyword – writeInTextBox(webElement, textToWrite), etc.

The code to perform the action based on a keyword specified in the external file is implemented in the framework itself.

In this way, the test steps can be written in a file by a person of a non-programming background also (provided all the used keywords are implemented in the framework).

What is JSON Wire Protocol?

  • JavaScript Object Notation (JSON) is used to represent objects with complex data structures. It is used primarily to transfer data between a server and a client on the web. It has very much become an industry standard for various REST web services, playing a strong alternative to XML.
    1. A sample JSON file, saved as a .json file, will look as follows:
    {
        "firstname": "John",
        "lastname": "Doe",
        "address": {
             "streetnumber":"678",
             "street":"Victoria Street",
              "city":"Richmond",
              "state":"Victoria",
              "country":"Australia"
         }
        "phone":"+61470315430" 
    }
    • A client can send a person’s details to a server in the preceding JSON format, which the server can parse and create an instance of the Person object for use in its execution.
    • Later, the response can be sent back by the server to the client in the JSON format, the data of which the client can use to create an object of a class.
    • This process of converting an object’s data to the JSON format and JSON-formatted data to an object is named serialization and de-serialization, respectively, which is quite common in REST web services these days.
    • Our WebDriver uses the same approach to communicate between client libraries (language bindings) and drivers, such as Firefox Driver, IE Driver, Chrome Driver, and so on. Similarly, the RemoteWebDriver client and the RemoteWebDriver server use the JSON wire protocol to communicate among themselves

What is RemoteWebDriver?

  • RemoteWebDriver is an implementation class of the WebDriver interface that a test script developer can use to execute their test scripts via the RemoteWebDriver server on a remote machine.
  • There are two parts to RemoteWebDriver: a server and a client
  • The RemoteWebDriver server is a component that listens on a port for various requests from a RemoteWebDriver client. Once it receives the requests, it forwards them to any of the following: Firefox Driver, IE Driver, or Chrome Driver, whichever is asked.
  • The language-binding client libraries that serve as a RemoteWebDriver client. The client, as it used to when executing tests locally, translates your test script requests to JSON payload and sends them across to the RemoteWebDriver server using the JSON wire protocol.
  • When you execute your tests locally, the WebDriver client libraries talk to your Firefox Driver, IE Driver, or Chrome Driver directly. Now, when you try to execute your tests remotely, the WebDriver client libraries talk to the RemoteWebDriver server and the server talks to either the Firefox Driver, IE Driver, or Chrome Driver, whichever the WebDriver client asks for.

What is Page Object Pattern and why should I use it?

  • The Page Objects pattern describes any web page in terms of a hierarchical Domain Specific Language (DSL). The application specific DSL helps to hide the page implementation; the test is no longer allowed to directly interact with a given page, but instead uses a framework of classes and methods to accomplish the same goal. This pattern abstracts the implementation details, such as element IDs, into a framework specifically designed for the application being tested. The Page Object design pattern provides tests for an interface where a test can operate on that page in a manner similar to the user accessing the page, but by hiding its internals. For example, if we build a Page Object test for a login page, then it will provide a method to log in, which will accept the username and password and take the user to the home page of the application. The test need not worry about how input controls are used for the login page, their locator details, and so on.Tests should use objects of a page at a high level, where any change in layout or attributes used for the fields in the underlying page should not break the test.Advantages:
    • After implementing the Page Objects pattern, we end up with a framework that describes the application from business point of view. Each action performed by a test using this framework should be easy to comprehend to anyone in the given field. That is to say, a test written for an accounting system that is heavy on the field’s jargon might not be easy to comprehend to the laymen; however, anyone with basic knowledge of the field should understand the intentions of each action.
    • Page Object pattern helps to test the desired behavior of the application using its DSL
    • This pattern helps in enhancing the tests, making them highly maintainable, reducing the code duplication, building a layer of abstraction, and hiding the inner implementation from tests.
    •  A well-implemented and rigid Page Objects framework has one and only way to accomplish any action. This prevents duplicate implementation of the same methods.
    • Since each Page Object is made from multiple smaller objects, such as header section or login form, the smaller objects can be shared between multiple Page Objects.

    Disadvantages:

    • Complexity is increased when using Page Objects framework. As the name implies, we can’t just write a simple procedural test, we need to create a framework.
    • Programming design patterns should be followed to make the code consistent and easy to understand. Otherwise, the framework quickly becomes muddled and complex to use and maintain.
    • As with any new tool, it is tempting to get carried away and use it everywhere. It’s tempting to implement a Page Objects framework on a test suite that only has 10 tests; this time could probably have been spent better improving existing code

How to Capture Screenshot using Selenium WebDriver?

  • The TakesScreenShot interface in the WebDriver library is implemented by all of the different variants of WebDriver, such as Firefox Driver, Internet Explorer Driver, Chrome Driver, and so on.The TakesScreenShot capability is enabled in all of the browsers by default.The API syntax for getScreenshotAs() is as follows:
     public <X> X getScreenshotAs(OutputType<X> target)

    Here, OutputType is another interface of the WebDriver lib. We can ask WebDriver to give your screenshot in three different formats; they are:

     BASE64

    BYTES (raw data),

    FILE.

     If you choose the FILE format, it writes the data into a .png file, which will be deleted once the JVM is killed. So, you should always copy that file into a safe location so that it can be used for later reference.

    The return type is a specific output that depends on the selected OutputType.

    OutputType.BYTES will return a byte array,

    OutputType.FILE will return a file object.

    Depending on the browser used, the output screenshot will be one of the following in the order of preference:

    1. The entire page
    2. The current window
    3. A visible portion of the current frame
    4. The screenshot of the entire display containing the browser
    • using Firefox Driver, getScreenshotAs() takes the screenshot of the entire page,
    • using Chrome Driver, getScreenshotAs() returns only the visible portion of the current frame.

    code example:

        File scrFile = ((TakesScreenShot)driver).getScreenshotAs(OutputType.FILE);
      System.out.println(scrFile.getAbsolutePath());

    The getScreenshotAs() method to take the screenshot of the webpage and save it to a file format.

     The getAbsolutePath() method returns the path of the saved image, which you can open and examine.

Explain Browser Navigation in Selenium WebDriver.

  • Navigate feature of WebDriver allows the test script developer to work with the browser’s Back, Forward, and Refresh controls. The method that is used for this purpose is navigate(). The following is its API syntax:            WebDriver.Navigation navigate()Obviously, there is no input parameter for this method, but the return type is the WebDriver. Navigation interface, which contains all of the browser navigation options that help you navigate through your browser’s history.a.  WebDriver.Navigation interface on which the to() method is used to navigate to a web URL    driver.navigate().to(“http://www.google.com”);b.  Navigation’s back() method to emulate our browser’s Back button using the following line of code:     driver.navigate().back();c.  Navigation’s forward() method to emulate our browser’s Forward button using the following line of code:
               driver.navigate().forward()        d.  Following method will reload the current URL to emulate the browser’s refresh (F5 key) action  driver.navigate().refresh();

What is headless browser and why should I use it?

  • We do not need to open up an instance of Browser(firefox/chrome/IE)  to execute our Selenium tests
  • Having the tests run in a browser allows us to view the execution as it is happening, which helps in the writing and debugging stages of a given test. However, once the test is complete and is reliably running in CI(Continuous Integration), we don’t always need to physically watch it run. A headless browser is a solution for these scenarios.
  • Using a headless browser, such as HTMLUnit Driver, increases the execution speed of the test suite, since the browser is not required to render the whole DOM. Furthermore, using a headless browser is a lot less resource-intensive, allowing a higher quantity of parallel-running tests.

Which is the fastest WebDriver?

HTMLUnitDriver.

HTMLUnitDriver does not execute tests on browser but plain http request – response which is far quick than launching a browser and executing tests.

Used to run some background processes or steps.

List the difference between findElement and findElements methods in WebDriver?

findElement() findElements()
The findElement() method returns first matching  WebElement object based on a specified search criteria. The findElements() method returns a list of WebElements matching the search criteria
throw up NoSuchElementFoundException exception when they fail to find the desired element using the specified locator strategy.  If no elements are found, it returns an empty list.
WebElement findElement(By by)
java.util.List<WebElement> findElements(By by)

List the difference between Selenium RC and Selenium WebDriver?

  •       Selenium RC Selenium Web driver
    Selenium RC, which was written purely in JavaScript for all the browser automation. The JavaScript, in Selenium RC, would then emulate user actions. This JavaScript would automate the browser from within the browse WebDriver on the other hand tries to control the browser from outside the browser. It uses accessibility API to drive the browser. The accessibility API is used by a number of applications for accessing and controlling applications when they are used by disabled users and is common to web browsers.
    With Selenium RC the New Browsers will be supported easily WebDriver uses the most appropriate way to access the accessibility API. If we look at Firefox, it uses JavaScript to access the API. If we look at Internet Explorer, it uses C++. This approach means we can control browsers in the best possible way but has the downside that new browsers entering the market will not be supported straight away like we can with Selenium RC.
    One of the biggest weaknesses in Selenium 1 (RC)is that it was written in JavaScript, which exposes security issues with third-party domains running arbitrary JavaScript code on any website. The security experts implemented strict rules to prevent Cross-Site Scripting (XSS). Web Driver interacts with page elements in a more realistic way.
    Selenium RC cannot support the headless HtmlUnit browser. It needs a real, visible browser to operate on. Web Driver can support HtmlUnit browser.

What all the programming languages supported to write test scripts in WebDriver?

Java, C#, Python and Ruby

Disclaimer: Yes-M Systems and/or their instructors reserve the right to make any changes to the syllabus as deemed necessary to best fulfill the course objectives. Students registered for this course will be made aware of any changes in a timely fashion using reasonable means.

Call for Enquiry