How to Read and Write the data in Notepad

This post helps you to Read and Write Data in Notepad. This is so simple. By using two classes FileReader, BufferedReader we can read data.

Browser compatibility testing using Selenium and TestNG

Cross Browser Testing : Is to check that your web application works as expected in different browsers.If we are using Selenium WebDriver, we can automate test cases using Internet Explorer, FireFox, Chrome, Safari browsers. To execute test cases with different browsers in the same machine at same time we can integrate TestNG with Selenium WebDriver.

How to create custom firefox profile in Selenium WebDriver

Why create a new Firefox profileA profile in Firefox is a collection of bookmarks, browser settings, extensions, passwords, and history; in short, all of your personal settings. When you want to run automation reliably on a Firefox browser.
It is advisable to make a separate profile. Automation profile should be light to load and have special proxy and other settings to run good test.
You should be consistent with the profile you use on all development and test execution machines. If you used different profiles everywhere, the SSL certificates you accepted or the plug-ins you installed would be different and that would make the tests behave differently on the machines.

Open your Firefox browser And follow the steps.

How to set the language using Selenium WebDriver

Internationalization is a process of designing a software application so that it can be adapted to various languages and regions without any changes

Localization is a process of adapting internationalized software for a specific region or language by adding local specific components and translating text.

If we want to check whether our application is properly internationalized , then we will manually change the language preferences in the browser itself. But if we want to check the same using WebDriver then we have to change the user language preferences.


What is API :
An application-programming interface (API) is a set of programming instructions and standards for accessing a Web-based software application or Web tool.

Example :

An API is a software-to-software interface, not a user interface. With APIs, applications talk to each other without any user knowledge or intervention. When you buy movie tickets online and enter your credit card information, the movie ticket Web site uses an API to send your credit card information to a remote application that verifies whether your information is correct. Once payment is confirmed, the remote application sends a response back to the movie ticket Web site saying it’s OK to issue the tickets.

Basic concepts of API (Application programming interface)

What is SOAP?
SOAP stands for Simple Object Access Protocol. It is a XML-based protocol for accessing web services. It is platform independent and language independent. By using SOAP, you could interact with other programming language applications. It is independent of the Transmission Protocol (could be HTTP, FTP, TCP, UDP).

SOAP relies exclusively on XML to provide messaging services. Any XML can be a SOAP if it contains the following:
The wrapping of the XML inside of a SOAP body
The wrapping of the SOAP body within a SOAP envelope
The optional inclusion of a SOAP header block
XML Namespace (xmlns) is required to indicate that this is a SOAP Request
Encoding style directives for the serialization of data
The binding of the whole thing to a protocol


Here I am trying to monitor system usage and the performance with different browsers which we use in selenium (Firefox,Chrome,Headless Browser). Just wanted to know how it works. Generally we never use this method. Whenever you execute your test cases, there would be load on your system.

Performance factors :
Important influence factors to the performance of any Java program can be separated into two main parts:

1.Memory Consumption of your program

2.Total runtime of your program

How to add extensions firebug firepath to the instantiated firefoxdriver

In general when we Instantiate a Firefox Webdriver, the extensions(firebug,firepath) would not be added in that browser. In order to add them we can set firefox preferences by downloading XPI’S.
Wait..! but why do we need to add firebug? The answer is simple, I just want to measure network latency of AUT in each browser. Maybe you call this as APM (Application performance Monitoring)

What is XPI : A file with the extension XPI (pronounced zippy ) contains a Firefox browserextension.These are very similar to zip files.

FireBug XPI : Download from here,Place it in your drive.

FirePath XPI :Download from here,Place it in your drive.

How to Zip your Test Automation Reports using Java

We can use this Class in Selenium to Zip your Test Automation Reports and mail them to anyone. We can use this for adding a file or a folder to the archive list. This Class is based on Java util & io Packages. In general we use Jenkins or some CI tool by adding plugins for auto mailing.


Framework: It is a set of Guidelines designed by an Expert in a generic way to accomplish a task in an effective and efficient manner.If you are using selenium webdriver and wants to create Keyword Driven Framework from scratch then follow bellow given steps.It will guide how to create hybrid framework .

Keyword Driven Framework is one of well known automation framework and extensively used in various service offering companies. Keyword Driven Framework also known as table-driven Framework or action word based framework.Here we’ll use some keywords as the driving parameters in data driven testing the data sheet. The keywords will be defined by the user, and let’s call them user defined keywords.The highlighted text in the below screenshot are the keywords.

Selenium Generic Methods (Framework Independent)

We all know, It’s always good to have reusable methods in your framework. Creating methods for every action to be performed on a webpage is not so easy while automating using Selenium. In order to suppress, we can create a class where we could store all the methods which are useful for your project. So I have created a Class ‘Utils’ under ‘utilty’ package & in this class, i’m gonna create static methods (creating an object is not required) and i’ll call these methods wherever i need them.This would be so simple to call (Syntax: ClassName.MethodName) these reusable methods.I just created these methods to make you understand, method names can be changed though.You can get the code by clicking HERE.


Selenium Grid helped me a lot in Compatibility check (Multiple Browsers & Multiple Platforms).This is grid helps us to execute multiple instances of WebDriver in parallel which uses the same code base (code which is present in only one system), hence the code need NOT be present on the other system they execute. The selenium-server-standalone includes Hub, WebDriver, and Selenium RC to execute the scripts in grid.

Selenium Grid has a Hub and a Node. Each hub may have many nodes.

Hub – The hub can also be understood as a server which acts as the central point where the tests would be triggered. A Selenium Grid has only one Hub and it is launched on a single machine once.
How to start Hub : java -jar selenium-server-standalone-2.42.2.jar -role hub


What is Saucelabs?Sauce Labs is a cloud platform for executing automated and manual mobile and web tests. Sauce Labs supports running automated tests with Selenium WebDriver (for web applications) andAppium (for native and mobile web applications).

Why do we need Saucelabs?Straight forward answer : Browser Compatibility. We need to test all our testcases in various versions of browsers and various platforms too. We can’t install all those stuff in our local box. Now this Saucelabs plays a major role.


What is Compatibility Testing?
Compatibility testing is a non-functional test to ensure that an application’s compatibility within different environments such various web browsers with various versions, Operating Systems (Windows, Linux, Mac…). In order to pass this test, we also need to check Forward and Backward Compatibility. Here i’m using Browserstack to perform Compatiblity testing.

BrowserStack allows users to make manual and automation testing on different browsers and operation systems.To execute your test scripts using BrowserStack, you need to set parameters of Browsers and Platforms.
There are few steps to be followed to integrate Selenium with BrowserStack.


We all know, designing a framework is a tedious task. So, this time I came up with an article on new framework RedwoodHQ, a Tester friendly with many built-in features and allows you to automate and manage your tests very quick.

What is RedwoodHQ?An Open source framework which supports Selenium, Appium and allows multiple users to design test cases and develop test scripts which can be written in a ubiquitous language and also allows you to execute them all using a friendly Web interface.
RedwoodHQ supports Java/Groovy, Python and C#.

Why should I use RedwoodHQ Framework?Using this framework, a non-tech guy can automate using the keywords available while designing the test case itself. We don’t need any IDE to configure. I guess this can be used for Bigger and Smaller projects as well.