selenium
  1. selenium-basic-terminology

Basic Terminology - (Selenium)

Selenium is a powerful automation testing tool that is designed to automate web-based applications on different browsers and operating systems. It helps developers and testers to test web applications more efficiently and effectively.

In the context of Selenium, there are some basic terminologies that are important to know:

WebDriver

WebDriver is an interface for web automation that enables users to interact with web browsers through programming languages like Python, Java, Ruby, etc. It facilitates the interaction between the user’s code and the web browser. WebDriver provides a set of methods to control different components of the web page such as buttons, drop-down lists, text fields, etc.

Element

An element refers to an HTML tag on a web page such as buttons, links, text boxes, checkboxes, radio buttons, and so on. Selenium can access these elements and perform desired actions such as clicking on a button, selecting a checkbox, or entering text in a text box.

Locator

Locators determine the location of an HTML element (tag) on a web page. There are different types of locators such as ID, Name, Class Name, Tag Name, XPath, CSS Selector, etc.

Find Element/Find Elements

Find element/find elements are the methods of the WebDriver class that enable Selenium to locate and access web page elements. find_element method returns the first matching element for the given criteria while find_elements method returns a list of matching elements.

XPath

XPath is a language used for locating web elements on an HTML or XML document. It provides a path expression that helps in finding an element somewhere in the document. XPath is one of the most widely used locators in Selenium because it helps locate elements even if they do not have an ID or name attribute.

CSS Selector

CSS Selector is another locator used in Selenium that enables users to locate web elements based on CSS selectors. CSS selectors are patterns used to select the HTML elements to which a style can be applied.

Wait

Wait is a mechanism used to restrict Selenium to wait for a certain amount of time before executing the next step in the code. It is important to include waiting times to make sure that the web elements have fully loaded before attempting to interact with them.

Summary

Understanding the basic terminology used in Selenium is crucial to the efficient and effective automation of web-based application testing. The most common terminology includes WebDriver, element, locator, find element/find elements, XPath, CSS Selector, and wait. Knowing and understanding these terminologies helps in writing efficient test scripts.

Published on: