Git repository commands

In this post you will learn Git commands with example.
1. git clone: This command clone existing repository 

Road to automate Html5 video with Webdriver (Selenium)

In this post I will show you how to automate HTML5 video.  To automate this we will use java scripts function to control video. So here we use “document.getElementById("Video ID")” , it return the HTML 5 video object. Using this object we can simulate video. Following are some java script function to handle video.
1. Play video
            document.getElementById("Video ID").play();  

Configuration of mobile user agent with webdriver

I this posts you will learn how to execute webdriver test script on browser using mobile user agent.

Installation:
1. Install user agent in Firfox from link: User Agent
2. Install user agent in Google chrome from link: User Agent

Road to override TestNg listener methods

In this post I will show you how to create custom testng listener  class and override its methods.
Create java class like I created below “MyListner” and inherit “TestListenerAdapter” testing class.

package com.test;

import org.testng.ITestResult;
import org.testng.TestListenerAdapter;

public class MyListner extends TestListenerAdapter {
       
     @Override
     public void onTestFailure(ITestResult result) {
        System.out.println(result.getName() + " Test method failed\n");
     }

     @Override
     public void onTestSkipped(ITestResult result) {
        System.out.println(result.getName() + " Test method skipped\n");
     }

     @Override
     public void onTestSuccess(ITestResult result) {
        System.out.println(result.getName() + " Test method success\n");
     }