A WebElement is just the reference to that element within the DOM. It is Selenium 's way of representing a DOM element to you so that you can manipulate it.
What are the locators in selenium?
Locator is a command that tells Selenium IDE which GUI elements ( say Text Box, Buttons, Check Boxes etc) its needs to operate on. Identification of correct GUI elements is a prerequisite to creating an automation script.
What is relative and absolute XPath?
Absolute Xpath: It uses Complete path from the Root Element to the desire element. Relative Xpath: You can simply start by referencing the element you want and go from there. Always Relative Xpaths are preferred as they are not the complete paths from the Root element. So Always use Relative Xpaths in your Automation.
There are 8 locators strategies included in Selenium:
WebDriver is a web automation framework that allows you to execute your tests against different browsers, not just Firefox (unlike Selenium IDE). WebDriver also enables you to use a programming language in creating your test scripts (not possible in Selenium IDE).
Apache POI is the most commonly used API for Selenium data driven tests. POI is a set of library files that gives an API to manipulate Microsoft documents like .xls and .xlsx. It lets you create, modify, read and write data into Excel.
Page Object Model is an Object Repository design pattern in Selenium WebDriver. POM creates our testing code maintainable, reusable. Page Factory is an optimized way to create object repository in POM concept.
Hence, Selenium Webdriver is the preferred tool to automate your testcases. What is an automation framework? A test automation framework is a set of concepts, and practices that provide support for automated software testing. It is a methodology built to successfully carry out test automation.
Apache Maven provides support for managing the full lifecycle of a test project. Maven is used to define project structure, dependencies, build, and test management. Using pom.xml(Maven) you can configure dependencies needed for building testing and running code.
HSSF is the POI Project's pure Java implementation of the Excel '97(-2007) file format. XSSF is the POI Project's pure Java implementation of the Excel 2007 OOXML (.xlsx) file format. HSSF and XSSF provides ways to read spreadsheets create, modify, read and write XLS spreadsheets.
|HSSF||Horrible Spreadsheet Format (Java implementation of Excel)|
|HSSF||Healthy Soils for Sustainable Farms (Australia; Soil Health Knowledge Bank; workshop)|
|HSSF||Heimler Scale of Social Functioning|
|HSSF||Hastings and St. Leonards Seniors' Forum (UK)|
Architecture. The Apache POI project contains the following subcomponents (meaning of acronyms is taken from old documentation): POIFS (Poor Obfuscation Implementation File System) – This component reads and writes Microsoft's OLE 2 Compound document format.
Apache POI is a popular API that allows programmers to create, modify, and display MS Office files using Java programs. It is an open source library developed and distributed by Apache Software Foundation to design or modify Microsoft Office files using Java program.
Data Driven Framework is one of the popular Automation Testing Framework in the current market. Data Driven automated testing is a method in which the test data set is created in the excel sheet, and is then imported into automation testing tools to feed to the software under test.
Hybrid framework is the combination of both keyboard driven and data driven. frameworks. About Implementation of the same at the time of creating of frame.
Before discussing the types of test automation frameworks, let's see what is a framework.
- What is a framework?
- Linear Scripting Framework:
- Modular Testing Framework:
- Data-driven Framework:
- Keyword Driven Testing Framework:
- Hybrid Driven Testing Framework:
- Behavior Driven Development Testing Framework:
SAF is a customized framework developed using Selenium, a widely accepted web application automation tool. It shrinks test cycle times and related costs. Selenium is a portable software testing framework for web applications. The tests can be written as HTML tables or coded in a number of popular programming languages.
XPath is defined as XML path. It is a syntax or language for finding any element on the web page using XML path expression. XPath is used to find the location of any element on a webpage using HTML DOM structure.
TestNG is a testing framework inspired from JUnit and NUnit but introducing some new functionalities that make it more powerful and easier to use, such as: Annotations. Run your tests in arbitrarily big thread pools with various policies available (all methods in their own thread, one thread per test class, etc).
The Seven Basic Steps of Selenium Tests
- Create a WebDriver instance.
- Navigate to a Web page.
- Locate an HTML element on the Web page.
- Perform an action on an HTML element.
- Anticipate the browser response to the action.
- Run tests and record test results using a test framework.
- Conclude the test.