Skip to main content

Posts

Showing posts with the label Software Automation Testing

Keyword Driven Framework Introduction - Part 1

Before starting this topic check the below articles once Automation using Selenium Java First script using Java Types of Automation Framework     Keyword Driven Framework is one of the automation framework types. In this type keywords specific to the function are saved in a separate file and test data is isolated. Tester's work is to map the keyword functions as per the required scripts. Other names for this framework are Table driven or Action Based testing. The necessity for this Framework     TDD is a good framework when compared to other previous frameworks. But that requires a tester with more programming knowledge. I am not saying Keyword Driven framework doesn't need programming knowledge. But it provides manual scripters to map the automation scripts to their test cases. For example, Navigating to the site is the essential thing. To perform this action automation tester will write a background script. To use this script manual tester will enter some keyword...

Selenium Framework[Test Data Driven Framework] - Framework Designing

Before starting your framework designing, Check below two topics Selenium Basics Read and Write in Excel using Apache POI Test Data Driven Framework     This type explains it's the definition in its name. The key idea in this framework is, test data in this framework will be managed by an external file. So, it will be helpful in changing the test data and can able to run the same test with multiple test data. This will help in reducing the number of scripts. By using Apache POI, we can able to read and write in the spreadsheet. Apache POI is used widely so I mentioned that other than this there are some more tools that provide methods to read and write in an excel spreadsheet.     For writing one or two test scripts, a basic package is necessary but when we try to build more test cases, it should be an easily understandable format. Different packages should be used to differentiate it's used in the framework. Package 1 - Excel file and methods to read and write excel...

Selenium Framework[Test Data Driven Framework] - Key methods in reading and writing Excel using POI

      Test data is very important in software automation. Because automation testers will be updating test data frequently. So, it must be handy for them. This type of framework provides the ability to store the test data in a separate file. Because of this testers can able to run scripts with multiple sets of test data. To access the external file java had some type of file reading libraries and we will use Apache POI in this tutorial. Before starting with framework designing check some basics about selenium Steps to download and configure Apache POI Navigate to this page  https://poi.apache.org/ Click download in the latest version of the JAR Download zip file in Binary Distribution Extract that in any location of your local In eclipse open new Java project Right-click on the project and navigate to the path Build Path -> Configure build path In the Libraries tab, click Add External Libraries Select all available jar files from the POI zip file Click Apply and c...

Types of Software Automation Frameworks

What is Software Automation Framework     While testing software there are many techniques to do the testing by manual. But when a project having multiple releases it's hard and time-consuming to perform all techniques manually. So to overcome this issue most of the repeated tasks are automated using a project feasible framework. Check this article to know more about Software Automation Why automation framework is required     Let us take an application name as A. This application had 5 releases. For the first release testers will do all required testing manually for that application. Then for the release 2 basic functionalities of the application will be the same and some new features may introduce. Rather than redoing the testing manually, all scenarios are automated and testers will just run the scripts.     In release 3, Some new feature is introduced and some basic functionality gets some changes. As the basic functionality got some changes some locato...

Page Object Model(POM) in Selenium

What is POM?         The full form of POM is the  P age O bject M odel. It provides the structural display for the project. In the real-time project, there will be many pages and many functions so framework structure will play a key role in framework updation. Web applications will be updated frequently so there will be many changes on the locators.  So the framework should help the locator updation. Let's discuss with the sample example below Sample Program Below are the steps that are scripted Login to the ticket booking site Fill in travel details and search the busses Click sign-in option Enter mobile number and generate OTP      package travelSite;      import java.awt.AWTException;      import org.openqa.selenium.By;      import org.openqa.selenium.WebDriver;      import org.openqa.selenium.chrome.ChromeDriver;      public class LoginSite { public static v...

Robot Class in Selenium

      In some scenarios, we will not able to use locators to find the location. In some times the application needs any data from the local. So, it will prompt any windows application like file explorer to the requested file. As we saw that selenium is only for web applications. To manage these scenarios Robot class will be required.     By using this Robot class all mouse and keyboard events can be used. This is the same as the Actions class and the only difference is this class helps to handle windows applications. To use this class you need to import the below package and object need to be created for this class to access the methods           import java.awt.Robot;           Robot robot = new Robot(); Methods used for Keyboard events keyPress(key) and keyRelease(key)     The parameter passed in this method should be of keyCode. To mention the key event new package needs to be imported...

Selenium Overview

Basics of Java Overview of Java  Check all articles related to selenium on this page Software Testing Automation Using Selenium First Script Using Selenium Java Locators in Selenium - Ways to Locate and Use Locators Most Useful Commands in Selenium Actions Class in Selenium Robot Class in Selenium Page Object Model(POM) in Selenium Types of Automation Framework TDD Framework - Read and Write excel using Apache POI TDD Framework Designing Keyword Driven Framework - part 1

Actions and Action in selenium

          Actions are a class in selenium architecture. It is used to perform mouse and keyboard actions and Action  is an interface. The main focus of these classes is to provide methods to simulate the actions done through mouse and keyboard during manual testing. Below are the methods that are mostly used in the scripts Commands to perform mouse Actions moveToElement(WebElement Element).doubleClick().perform()     moveToElement method is used to navigate the mouse pointer to the middle of the element. and Doubleclick method is used to perform double click action in the mouse. While performing double click action first mouse point should be moved to that element using the moveToElement method. For all the actions performed on these actions class perform method needs to be used at last.            actions.moveToElement(Element).doubleClick().build().perform(); Example         ...

Most useful commands in Selenium using Java

Here the list of most used commands in selenium with its uses. get(String value)     This method is used to launch the URL. Full URL of the application to test should be passed in this method                     String landingURL = "https://www.facebook.com/";                     driver.get(landingURL); getCurrentURL()     This method is used to get the current site URL. No need to pass the parameter to this method and it returns a string of the current URL.                     driver.getCurrentUrl(); getTitle()     This method is used to get the page title. This method passes nothing and returns a String value of the title                     driver.getTitle() manage().window().maximize()     This command is u...