Posts

Implement Code Re-usability in Selenium Automation Framework

Image
In this post, you will learn kind of coding pattern which is very helpful in maintaining our automation code. This post is written insight to help beginners. We'll learn that instead of writing a linear script, we should create page (action) methods which in general contain actions which we are going to perform on our web software. Let's say, we have a login functionality in our software and we have to automate it. In that case we'll create a method named login and write the commands like, entering username, password and click login in that method. Now we can use that method wherever we need it in other test cases as well. Benefits of using action methods are: Code Re-usability Better maintainability of code Sample Program for Re-Usable Action Methods: package com . techlistic . tute ; import org.junit.Assert ; import org.junit.Test ; import org.openqa.selenium.By ; import org.openqa.selenium.WebDriver ; import org.openqa.selenium.WebElement ; import o...

Automate GoDaddy.com Features with Selenium WebDriver

Image
This post contains two assignments that helps you to learn Selenium browser commands. These are the simplest assignments. So, this assignment post is the best suited to start your automation tester journey. 1. Automate Browser Actions on GoDaddy.com If you are a beginner in automation testing and looking forward to writing your first Selenium code, then this post is the best destination for you. This assignment will teach you the basic commands of Selenium Webdriver to perform basic actions like., Launch the browser, maximize the browser window, validate the page title, and close the browser. In this post, you will find very basic step-by-step assignments which will upgrade your understanding of Selenium Webdriver and its commands. 1. Test Case - Open Godaddy.com and maximize the browser window. Steps to Automate:

Master Selenium Locators: ID, Class, Name, Xpath & More

Image
Introduction to Selenium Locators Selenium WebDriver is the most popular open-source tool for  automating web browsers , used by QA engineers and developers worldwide. With support for multiple programming languages (Java, Python, C#, Ruby), it enables  efficient web automation testing . One of the  most critical skills  in Selenium automation is  locating web elements accurately . This guide covers  all Selenium locators , their best use cases, and  pro tips  to enhance your test automation framework. Why Are Locators Important in Selenium? Locators help Selenium  identify and interact  with web elements like: Buttons 🖱️ Text fields 📝 Dropdowns 🔽 Checkboxes ☑️ Links 🔗 Using the  right locator strategy  improves: ✅  Test stability  (fewer broken scripts) ✅  Execution speed  (faster element finding) ✅  Maintainability  (easier script updates) 8 Types of Selenium Locators (With Examples) 1. ...

Mastering User Interactions with the Actions Class in Selenium WebDriver

Image
1. Introduction Selenium WebDriver is a widely used framework for automating web browser interactions. In this tutorial, we will cover the initial setup required to start using Selenium WebDriver, creating instances of the Actions class, and performing various mouse actions using Selenium. Let's dive in! Table of Contents Introduction 1.1. What is Actions Class? 1.2. Benefits of Using Actions Class

What is Inheritance in Java?

Inheritance is an important feature of OOP(Object Oriented Programming). It is the mechanism in java by which one class is allow to inherit the features(fields and methods) of another class. Important terminology: Super Class:  The class whose features are inherited is known as super class(or a base class or a parent class). Sub Class:  The class that inherits the other class is known as sub class(or a derived class, extended class, or child class). The subclass can add its own fields and methods in addition to the superclass fields and methods. Reusability:  Inheritance supports the concept of “reusability”, i.e. when we want to create a new class and there is already a class that includes some of the code that we want, we can derive our new class from the existing class. By doing this, we are reusing the fields and methods of the existing class. Syntax of Inheritance: class  SubclassName  extends  SuperclassName   {   ...