Posts

Showing posts with the label QA Automation

How to create cucumber BDD framework from scratch: Practical example

Image
In this post, I’ll walk you through the complete workflow of my Cucumber BDD Framework project, which I developed to automate test scenarios for the website Automation Practice . You can explore the full project here: GitHub Repository . 1. Project Overview This project is a hybrid automation framework based on Cucumber BDD using Java, Selenium WebDriver, and Maven . It supports Page Object Model (POM) , and integrates with Jenkins CI/CD and GitHub for version control. 2. Folder Structure 📋 Folder Summary Table Folder/File Purpose .vscode/ IDE-specific settings and preferences. .mvn/ Maven runtime configurations. src/main/java/com Core reusable framework classes. factory/ WebDriver setup and initialization. pages/ Page Object Model (POM) design classes. utilities/ Helper functions and utilities. src/test/java/ Step definitions, hooks, and test runners. resources/com Feature files and ...

How to handle files in Java for QA Engineers

Image
As a QA Engineer, especially when dealing with automation using Java, it's essential to understand how file handling works. Whether it’s reading a test data file, logging test results, or writing reports — **basic file operations** are a part of real-time QA work. In this blog post, you will learn: - How to create , write , read , and delete a file in Java - How to read/write Excel files using Apache POI - Real-world QA scenarios where file handling is useful - Some practice questions to boost your understanding 📂 1. Creating a File in Java You can create a new file using the File class. import java.io.File; public class CreateFile { public static void main(String[] args) { try { File file = new File("testdata.txt"); if (file.createNewFile()) { System.out.println("File created: " + file.getName()); } else { System.out.println("File already exists."); } } catch (Exceptio...

Master CSS Selector in Selenium: The Ultimate Guide for Testers

Image
CSS Selectors are one of the most powerful ways to locate web elements in Selenium WebDriver. They are faster and more readable than XPath in many cases, and mastering them is essential for every QA Engineer working on web automation. Why this guide? This blog will help you understand everything about CSS Selectors in Selenium with examples, best practices, and how to handle real-time scenarios. 🔍 What is a CSS Selector? A CSS Selector is a pattern used to select HTML elements based on attributes like ID, class, type, name, etc. In Selenium, it is used with the By.cssSelector() method to locate elements. WebElement element = driver.findElement(By.cssSelector("input#username")); 📚 Basic CSS Selectors 1. ID Selector Use # followed by the ID value. input#email 2. Class Selector Use . followed by the class name. button.btn-primary 3. Tag Selector Selects elements by their tag name. input 4. Attribute Selector Selects elements with specific a...

Master Java Strings for QA Engineers: A Practical Guide

Image
String is a data type in Java which stores sequence of character enclosed by double quotes.. Whether it's verifying APIs, validating UI data, or database testing, QA engineers frequently work with strings. It is also one of the important topic which generally asked in interviews. Let's break it down step-by-step! 🔹What is a String in Java? A String is a sequence of characters enclosed within double quotes (""). Java provides a robust and flexible API for handling strings, allowing for various operations such as concatenation, comparison, and manipulation. In Java, String is a class present in the java.lang package. String str = "Hello World"; Internally, Java strings are backed by a character array ( char[] ). 🔹Types of String Declaration There are two ways to create a string in Java ✅ 1. String Literal When a string is created using double quotes, Java checks the string pool first. If it already exists, it reuses the object. Str...

How To Transition From Manual To Automation Testing in 5 steps

Image
  Introduction Many manual testers with some experience aspire to switch to automation testing but often struggle with where to begin. Balancing learning automation alongside their current job can also be challenging. Who is this Blog For? Manual testers with no coding experience. QA professionals looking to upskill. Testers seeking career growth. In this blog, you’ll discover how to start your journey into automation, which skills to prioritize, and the best learning resources. I was once a manual tester with zero coding experience, and today, I have gained expertise to build automation frameworks using Selenium and Java. Why Should Manual Testers Learn Automation? 1. Growing Industry Demand Companies are shifting towards automation to reduce manual efforts in regression testing, saving both time and costs. This transition creates a high demand for automation testers. 2. Higher Salary Opportunities Automation testers generally earn more than ma...

How Selenium Works for Web Automation

Image
Selenium is one of the most popular tools for web automation testing. It allows testers and developers to automate browsers for testing purposes or other repetitive tasks. To understand how Selenium works, we need to dive into its architecture and key components. What Is Selenium? Selenium is an open-source framework that automates web browsers. It supports multiple programming languages, including Java, Python, C#, and JavaScript, to write test scripts. Selenium is widely used for functional testing and supports all major browsers like Chrome, Firefox, Safari, Edge, and Internet Explorer. Selenium Components Selenium is not just a single tool; it’s a suite of tools designed to cater to different automation needs. Here are the core components: Selenium Component Details Selenium WebDriver Overview: Directly interacts with browsers via drivers to automate web applications. It supports multiple programming...