Posts

Locators

Mastering Locators in Selenium Mastering Locators in Selenium What Are Locators? Locators are the search criteria used to identify web elements on a webpage. Selenium supports eight primary locator strategies: Id Name Class Link Text Partial Link Text Tag Name CSS Selector XPath These strategies are implemented as methods in Selenium’s By class, which provides static methods to define each locator. Using findElement() The findElement() method in Selenium is used to locate a single web element based on the given locator strategy. Example: driver.findElement(By.id("loginButton")).click(); Sample HTML Code with Duplicate Elements <html> <head> <title>DemoSite</title> </head> <body> <div> <input type

Role of HTML in Automation - Introduction to HTML

  Understanding HTML: A Guide for Beginners As an experienced test engineer, I've worked extensively with HTML, the foundational language of the web. HTML stands for HyperText Markup Language, and it's used to display data in a structured format in web browsers. Let’s dive into the basics of HTML to give you a clear picture of how it works. What is HTML? HTML is a markup language that uses tags to structure content on the web. These tags, enclosed in angle brackets < > , tell the browser how to display text, images, and other elements on a webpage. HTML is a tree-structured, case-insensitive language, meaning it’s not affected by uppercase or lowercase letters. Basic Structure of HTML Every HTML document starts with the <html> tag, which is the root of the document. This tag has two main child tags: <head> and <body> . <head> : Contains meta-information about the document, such as its title. <body> : Contains the content that is displayed o

Handling Browser Window

Understanding Selenium WebDriver Interface WebDriver Interface in Selenium The WebDriver interface is the core of Selenium WebDriver, used to control the web browser. It allows you to perform various browser actions such as maximizing the browser window, navigating through browser history, and opening specific URLs of the application under test (AUT). Without this interface, automation would not be possible, which is why it is named Selenium WebDriver. Key Methods for Browser Control get(String url) getTitle() getCurrentUrl() getPageSource() close() quit() navigate() manage() getWindowHandles() getWindowHandle() switchTo() Additionally, the WebDriver interface inherits two methods from the SearchContext interface: findElement(By by) - Fin

Introduction To Selenium

Image
Introduction to Selenium What is Selenium? Selenium is an open-source test automation tool used to test web applications and mobile applications. It allows testers to automate the testing process, making it more efficient and reliable. Open Source: Free to use and modify. Test Automation Tool: Software used to test other software. Web Application: Applications accessed via a web browser. Mobile Application: Applications designed to run on mobile devices such as smartphones or tablets. Key Points: To test web applications, use Selenium WebDriver. To test mobile applications, use Appium. Selenium is a headless tool, meaning it does not have a user interface. Advantages of Selenium Open Source: Selenium is free to download and use for both personal and business purposes.

Introduction to Automation

A Beginner's Guide to Automation Testing A Beginner's Guide to Automation Testing As an experienced test engineer, I'd like to introduce you to the fascinating world of automation testing. This guide aims to provide you with a clear and simple understanding of what automation testing is, when to use it, and the tools and benefits associated with it. What is Automation? Automation in software testing involves converting manual test cases into automated test scripts. Essentially, it's when one software tests another to ensure that actual results match expected outcomes. This method streamlines the testing process, increasing efficiency and reliability. When Should We Opt for Automation? Automation testing is not always necessary, but it becomes essential in certain scenarios: Regression Testing: For repeated regression testing, instead of manually executing old test