text:
<file_sep>package AutomationFramework;

import org.apache.commons.lang3.RandomStringUtils;
import org.openqa.selenium.WebDriver;

import Utility.Constant;
import Utility.Excel;

public class GenerateTestData {

	private static String sPassword;
	private static String sUsername;
	private static String Fullname;

	public static String[] Execute (WebDriver driver)throws Exception{

		Excel.setExcelFile(Constant.Path_TestData+Constant.File_TestData,"TestingData");
		String[] generatedInfo = testData(driver);

		sUsername = generatedInfo[0];
		sPassword = generatedInfo[1];
		Fullname = generatedInfo[2];

	      // setting spreadsheet and putting the data

	  Excel.setCellData(sUsername, 1, 1);
	  Excel.setCellData(sPassword, 1, 2);

	  return generatedInfo;
	}

	public static String[] testData(WebDriver driver) throws Exception
      {

        int ran = 1000+ (int)(Math.random() * ((100-1) +1));
		sUsername = ("seleniumuser"+ran+"@<EMAIL>");

		sPassword = RandomStringUtils.randomAlphanumeric(20).toUpperCase();

		Fullname = (" Test User");

		String[] rsp = {sUsername, sPassword, Fullname};
        return rsp;

      }

}<file_sep>package testCases;

import static org.junit.Assert.fail;

import java.util.concurrent.TimeUnit;

import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

import pageObject.API_Twiiter;
import pageObject.API_facebook;
import pageObject.Page_Header;
import pageObject.Password_Page;
import pageObject.SignIn_Page;
import Utility.Constant;
import Utility.Excel;
import Utility.Log;

/**
 * The testSignIn_Facebook class implements an application that simply test signin using facebook
 *  and displays output result in the excel sheet
 */

public class TestSignIn_Facebook {

	private static String sUsername;
	private static String sPassword;
	private static String Parent_Window;
	private static WebElement element = null;

	public TestSignIn_Facebook (String sUsername, String sPassword,String Parent_Window)
	{

		this.sUsername = sUsername;
		this.sPassword = <PASSWORD>;
		this.Parent_Window = Parent_Window;
	}

	/**
	 * This method invokes all the signIn test cases
	 */

	public static void Execute(WebDriver driver) throws Exception

	{

		Log.startTestCase("testSignIn_Facebook");

		/* function for setting excel sheet to read test data */
		setTestData(driver);

		/* This will execute all the signIn test cases using Facebook */
		test_signIn_Facebook(driver);

		Log.endTestCase("testSignIn_Facebook");

	}

	public static void setTestData(WebDriver driver) throws Exception {

		Excel.setExcelFile(Constant.Path_TestData + Constant.File_TestData, "signIn");
		Log.info("Excel sheet set up to fetch test data");
	}

	public static void test_signIn_Facebook(WebDriver driver) throws Exception

	{

		driver.get(Constant.URL+"/index.php/login");
		Log.info("SignIn page has been crowled");

		String Parent_Window = driver.getWindowHandle();
		Log.info("Cureent window title saved");

		SignIn_Page.facebookButton(driver).click();
		Log.info("facebook button clicked");

		for (String winHandle : driver.getWindowHandles()) {
			Log.info("Facebook popup opened");
			driver.switchTo().window(winHandle);
			Log.info("switched to facebook pop-up window");
		}

		sUsername = Excel.getCellData(16, 1);
		Log.info("username been picked up");

		sPassword = Excel.getCellData(16, 2);
		Log.info("password  been picked up");

		API_facebook.email_field(driver).clear(); // facebook popup window
		API_facebook.email_field(driver).sendKeys(sUsername);
		Log.info("username enterd");
		API_facebook.password_field(driver).clear();
		API_facebook.password_field(driver).sendKeys(<PASSWORD>);
		Log.info("password entered");

		element = (new WebDriverWait(driver, 10)).until(ExpectedConditions
				.elementToBeClickable(API_facebook.login_button(driver)));

		API_facebook.login_button(driver).click();
		Log.info("SignIn button clicked");

		driver.switchTo().window(Parent_Window);
		Log.info("popup closed, switch to main window");

		element = (new WebDriverWait(driver, 10)).until(ExpectedConditions
				.elementToBeClickable(Page_Header.munuLink(driver)));

		Page_Header.munuLink(driver).click();
		Log.info("Click on menu");

		Page_Header.signoutButton(driver).click();
		Log.info("signout button clicked");

		element = (new WebDriverWait(driver, 10)).until(ExpectedConditions
				.elementToBeClickable(Page_Header.signIN_link(driver)));

		Log.info("user signout");

		Excel.setCellData("Pass", 16, 4);

		Log.info("Test case TC_010 executed and result posted successfully");

	}

	private static boolean isElementPresent(WebElement webElement) {
		// TODO Auto-generated method stub
		return false;
	}

}

<file_sep>package pageObject;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.testng.annotations.Test;

import Utility.Log;

public class API_Twiiter {

	public static WebElement element = null;

	public static WebElement email_field(WebDriver driver) throws Exception

	{
		try
		{
			element = driver.findElement(By.id("username_or_email"));
			Log.info("twitter email field found on page");
			return element;
		}
		catch (Exception e)
		{
			Log.error("twitter email field not found on page");
			throw (e);
		}

	}

   public static WebElement password_field(WebDriver driver) throws Exception

   {
	   try
	   {
		   element = driver.findElement(By.id("password"));
		    Log.info("twitter password field found on page");
		    return element;
	   }
	   catch (Exception e)
	   {
		   Log.error("twitter password field found on page");
			throw (e);
	   }

    }

   public static WebElement allow_button(WebDriver driver) throws Exception

    {
	   try
	   {
		   element = driver.findElement(By.id("allow"));
		   Log.info("twitter allow button found on page");
		   return element;
	   }
	   catch (Exception e)
	   {
		   Log.error("twitter allow button not found on page");
			throw (e);
	   }
    }
}
<file_sep>package appModules;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.sikuli.script.Key;
import org.sikuli.script.Pattern;
import org.sikuli.script.Screen;

import Utility.Constant;
import Utility.Log;

public class StripePurchase_action {

	private static final WebDriver driver = null;
	private static String email;
	private static String pass;
	private static String slug;
	private static String card_number;
	private static String text;
	private static WebElement element = null;

    static Pattern img3 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse+"stripe.png");
    static Pattern img4 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse+"pay.png");

    static Screen s = new Screen();

    public StripePurchase_action(String slug, String card_number, String email, String pass, String text)

    {
    	this.slug = slug;
    	this.card_number = card_number;
    	this.pass = pass;
    	this.text = text;
    }

               	public static void Execute(WebDriver driver) throws Exception

               	{

               	  valid_card_details(driver);
   	              Log.info("card details set");

	        	     s.wait(img3, 100);
                     s.click(img3);
                     s.type(card_number);
                     Log.info("Card number enterd");

                     s.type(Key.TAB);
                     s.type("06/17");
                     Log.info("CArd expiry date entered");

                     s.type(Key.TAB);
                     s.type("123");
                     Log.info("Code enterd");

                     s.click(img4);
                     Log.info("Clicked on pay");

	            }

                public static void valid_card_details(WebDriver driver) throws Exception

  	          {

                           card_number =  "4242424242424242";
  	          }

  	          public static void invalid_card_details(WebDriver driver) throws Exception

  	          {

                         card_number = "4007000000027";
  	          }

  	          public static void declined_card_details(WebDriver driver) throws Exception

  	          {

                      card_number = "4000000000000002";
  	          }

	private static boolean assertTrue(boolean b) {
		// TODO Auto-generated method stub
		return false;
	}

}
<file_sep>package pageObject;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

import Utility.Log;

public class ContainerCloudUpload {

	private static WebElement element = null;

	//-----------------------drop box------------------------------------//

	public static WebElement filmContainer_dropbox(WebDriver driver)throws Exception{
		element = driver.findElement(By.xpath("html/body/div[5]/div/section/div/form/div[1]"));
		Log.info("drop box film container found");
		return element;
	}

	public static WebElement film_dropbox(WebDriver driver)throws Exception{
		element = driver.findElement(By.xpath("html/body/div[5]/div/section/div/form/div[1]/div/div/div[1]/ul/li[1]/a"));
		Log.info("drop box film on container found");
		return element;
	}

	public static WebElement Select_Button_DropBox(WebDriver driver)throws Exception{
		element = driver.findElement(By.xpath("html/body/div[5]/div/section/div/form/div[4]/input"));
		Log.info("drop box film container  submit button found");
		return element;

	}

//------------------------------------ S3--------------------------------------//

	public static WebElement filmContainer_S3(WebDriver driver)throws Exception{
		element = driver.findElement(By.xpath("html/body/div[6]/div/section/div/form/div[1]"));
		Log.info("S3 film container found");
		return element;
	}

	public static WebElement film_S3(WebDriver driver)throws Exception{
		element = driver.findElement(By.xpath("html/body/div[6]/div/section/div/form/div[1]/div/div/div/ul/li[1]/a"));
		Log.info("S3 film on container found");
		return element;
	}

	public static WebElement Select_Button_S3(WebDriver driver)throws Exception{
		element = driver.findElement(By.xpath("html/body/div[6]/div/section/div/form/div[4]/input[1]"));
		Log.info("S3 film container submit button found");
		return element;
	}

	//------------------------------------ gDrive--------------------------------------//

		public static WebElement filmContainer_gDrive(WebDriver driver)throws Exception{
			element = driver.findElement(By.xpath("html/body/div[6]/div/section/div/form/div[1]"));
			Log.info("gdrive film container found");
			return element;
		}

		public static WebElement film_gDrive(WebDriver driver)throws Exception{
			element = driver.findElement(By.xpath("html/body/div[6]/div/section/div/form/div[1]/div/div/div/ul/li[1]/a"));
			Log.info("gdrive film on container found");
			return element;
		}

		public static WebElement Select_Button_gDrive(WebDriver driver)throws Exception{
			element = driver.findElement(By.xpath("html/body/div[6]/div/section/div/form/div[4]/input[1]"));
			Log.info("gdrive film container submit button found");
			return element;
		}

		//--------------------------------sugerSync-------------------------------//

		public static WebElement filmContainer_sugerSync(WebDriver driver)throws Exception{
			element = driver.findElement(By.xpath("html/body/div[6]/div/section/div/form/div[1]"));
			Log.info("sugersync film container found");
			return element;
		}

		public static WebElement form_sugerSync(WebDriver driver)throws Exception{
			element = driver.findElement(By.xpath("html/body/div[6]/div/section/div/form/div[1]/div/div/div/ul/li/a"));
			Log.info("sugersync form on container found");
			return element;
		}

		public static WebElement film_sugerSync(WebDriver driver)throws Exception{
			element = driver.findElement(By.xpath("html/body/div[6]/div/section/div/form/div[1]/div/div/div/ul/li/ul/li/a"));
			Log.info("sugersync film on container found");
			return element;
		}

		public static WebElement Select_Button_sugerSync(WebDriver driver)throws Exception{
			element = driver.findElement(By.xpath("html/body/div[6]/div/section/div/form/div[4]/input[1]"));
			Log.info("sugersync film container submit button found");
			return element;
		}

	//---------------------------------oneDrive--------------------------------------//

		public static WebElement filmContainer_oneDrive(WebDriver driver)throws Exception{
			element = driver.findElement(By.xpath("html/body/div[6]/div/section/div/form/div[1]"));
			Log.info("onedrive film container found");
			return element;
		}

		public static WebElement film_oneDrive(WebDriver driver)throws Exception{
			element = driver.findElement(By.xpath("html/body/div[6]/div/section/div/form/div[1]/div/div/div/ul/li[4]/a"));
			Log.info("onedrive film on container found");
			return element;
		}

		public static WebElement Submit_Button_oneOrive(WebDriver driver)throws Exception{
			element = driver.findElement(By.xpath("html/body/div[6]/div/section/div/form/div[4]/input[1]"));
			Log.info("onedrive film container submit button found");
			return element;
		}

}
<file_sep>package testCases;

import static org.junit.Assert.fail;

import java.util.concurrent.TimeUnit;

import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

import appModules.SigIn_action;
import pageObject.API_Twiiter;
import pageObject.API_facebook;
import pageObject.Page_Header;
import pageObject.Password_Page;
import pageObject.SignIn_Page;
import Utility.Constant;
import Utility.Excel;
import Utility.Log;

/**
 * The testSignInValidationMessages class implements an application that simply test validation on user signin action and
 * displays output result in the excel sheet
 */

public class TestSignInValidationMessages {

	private static String sUsername;
	private static String sPassword;
	private static String Parent_Window;
	private static WebElement element = null;

	public TestSignInValidationMessages (String sUsername, String sPassword,String Parent_Window)
	{

		this.sUsername = sUsername;
		this.sPassword = <PASSWORD>;
		this.Parent_Window = Parent_Window;
	}

	/**
	 * This method invokes all the signIn validation test cases
	 */

	public static void Execute(WebDriver driver) throws Exception

	{

		Log.startTestCase("testSignInValidationMessages");

		/* function for setting excel sheet to read test data */
		setTestData(driver);

		/* This will execute all the signIn test cases using email */
		test_signIN_Email_Validation(driver);

		Log.endTestCase("testSignInValidationMessages");

	}

	public static void test_signIN_Email_Validation(WebDriver driver) throws Exception

	{

		driver.get(Constant.URL+"/index.php/login");
		Log.info("SignIn page has been crowled");

		setTestData(driver);

		test_Validation_With_Only_Email(driver);
		test_Validation_With_Only_Password(driver);
		test_Validation_With_right_email_and_wrong_password(driver);
		test_Validation_With_wrong_email_and_right_password(driver);
		test_Validation_With_userNname_and_password(driver);
		test_Validation_With_right_userName_and_wrong_password(driver);
		test_Validation_With_wrong_userName_and_right_password(driver);
		test_Validation_With_email_and_password_field_blank(driver);
		test_Validation_using_browser_back_button_post_signOut(driver);

		Log.endTestCase("SignIn Email");

	}

	public static void setTestData(WebDriver driver) throws Exception {

		Excel.setExcelFile(Constant.Path_TestData + Constant.File_TestData, "signIn");
		Log.info("Excel sheet set up to fetch test data");
	}

	public static void test_Validation_With_Only_Email(WebDriver driver) throws Exception

	{
     	Log.info("test_Validation_With_Only_Email executing");
		sUsername = Excel.getCellData(2, 1);
		Log.info("username been picked up");
		sPassword = Excel.getCellData(2, 2);
		Log.info("password has been picked up");

		SigIn_action.Execute(driver, sUsername, sPassword);
		Log.info("signin action has been executed");

		if (SignIn_Page.Error_message(driver).getText()
				.equals(Excel.getCellData(2, 3))) {
			Excel.setCellData("Pass", 2, 4);
			Log.info("result posted over excelscheet with status as pass");
		} else {
			Excel.setCellData("Fail", 2, 4);
			Log.info("result posted over excelscheet with status as fail");
		}

		Log.endTestCase("Test case TC_001 executed and result posted executed");

	}

	public static void test_Validation_With_Only_Password(WebDriver driver) throws Exception {

		Log.info("test_Validation_With_Only_Password executing");

		sUsername = Excel.getCellData(3, 1);
		Log.info("username been picked up");

		sPassword = Excel.getCellData(3, 2);
		Log.info("password  been picked up");

		SigIn_action.Execute(driver, sUsername, sPassword);
		Log.info("signin action has been executed");

		if (SignIn_Page.Error_message(driver).getText()
				.equals(Excel.getCellData(3, 3))) {
			Excel.setCellData("Pass", 3, 4);
			Log.info("result posted over excelscheet with status as pass");
		} else {
			Excel.setCellData("Fail", 3, 4);
			Log.info("result posted over excelscheet with status as fail");
		}

		Log.endTestCase("Test case TC_002 executed and result posted executed");

	}

	public static void test_Validation_With_right_email_and_wrong_password(WebDriver driver) throws Exception {

		Log.info("test_Validation_With_right_email_and_wrong_password executing");

		sUsername = Excel.getCellData(4, 1);
		Log.info("username been picked up");

		sPassword = Excel.getCellData(4, 2);
		Log.info("password  been picked up");

		SigIn_action.Execute(driver, sUsername, sPassword);
		Log.info("signin action has been executed");

		element = (new WebDriverWait(driver, 10)).until(ExpectedConditions
				.elementToBeClickable(SignIn_Page.Error_message(driver)));

		if (SignIn_Page.Error_message(driver).getText()
				.equals(Excel.getCellData(4, 3))) {
			Excel.setCellData("Pass", 4, 4);
			Log.info("result posted over excelscheet with status as pass");
		} else {
			Excel.setCellData("Fail", 4, 4);
			Log.info("result posted over excelscheet with status as fail");
		}

		Log.info("test_Validation_With_right_email_and_wrong_password executed");

	}

	public static void test_Validation_With_wrong_email_and_right_password(WebDriver driver) throws Exception

	{

		Log.info("test_Validation_With_wrong_email_and_right_password executing");

		sUsername = Excel.getCellData(5, 1);

		sPassword = Excel.getCellData(5, 2);
		Log.info("password  been picked up");

		SigIn_action.Execute(driver, sUsername, sPassword);
		Log.info("signin action has been executed");

		if (SignIn_Page.Error_message(driver).getText()
				.equals(Excel.getCellData(5, 3))) {
			Excel.setCellData("Pass", 5, 4);
			Log.info("result posted over excelscheet with status as pass");
		} else {
			Excel.setCellData("Fail", 5, 4);
			Log.info("result posted over excelscheet with status as fail");
		}

		Log.info("test_Validation_With_wrong_email_and_right_password executed");

	}

	public static void test_Validation_With_userNname_and_password(WebDriver driver) throws Exception

	{
		Log.info("test_Validation_With_userNname_and_password executing");

		sUsername = Excel.getCellData(6, 1);
		Log.info("username been picked up");

		sPassword = Excel.getCellData(6, 2);
		Log.info("password  been picked up");

		SigIn_action.Execute(driver, sUsername, sPassword);
		Log.info("signin action has been executed");

		Log.info("user successfully signin");

		element = (new WebDriverWait(driver, 10)).until(ExpectedConditions
				.elementToBeClickable(Page_Header.munuLink(driver)));

		Page_Header.munuLink(driver).click();
		Log.info("menu link appears");

		Page_Header.signoutButton(driver).click();

		element = (new WebDriverWait(driver, 10)).until(ExpectedConditions
				.elementToBeClickable(Page_Header.signIN_link(driver)));
		Log.info("user successfully signout");

		Excel.setCellData("Pass", 6, 4);
		Log.info("result posted over excelscheet with status as pass");

		Log.info("test_Validation_With_userNname_and_password executed");

	}

	public static void test_Validation_With_right_userName_and_wrong_password(WebDriver driver) throws Exception

	{

		Log.info("test_Validation_With_right_userName_and_wrong_password");

		driver.get(Constant.URL +"/index.php/login");

		sUsername = Excel.getCellData(7, 1);
		Log.info("username been picked up");

		sPassword = Excel.getCellData(7, 2);
		Log.info("password  been picked up");

		SigIn_action.Execute(driver, sUsername, sPassword);
		Log.info("signin action has been executed");

		if (SignIn_Page.Error_message(driver).getText()
				.equals(Excel.getCellData(7, 3))) {
			Excel.setCellData("Pass", 7, 4);
			Log.info("result posted over excelscheet with status as pass");

		} else {
			Excel.setCellData("Fail", 7, 4);
			Log.info("result posted over excelscheet with status as fail");
		}

		Log.info("test_Validation_With_right_userName_and_wrong_password executed");

	}

	public static void test_Validation_With_wrong_userName_and_right_password(WebDriver driver) throws Exception

	{

		Log.info("test_Validation_With_wrong_userName_and_right_password executing");

		sUsername = Excel.getCellData(8, 1);
		Log.info("username been picked up");

		sPassword = Excel.getCellData(8, 2);
		Log.info("password  been picked up");

		SigIn_action.Execute(driver, sUsername, sPassword);
		Log.info("signin action has been executed");

		if (SignIn_Page.Error_message(driver).getText()
				.equals(Excel.getCellData(8, 3))) {
			Excel.setCellData("Pass", 8, 4);
			Log.info("result posted over excelscheet with status as pass");
		} else {
			Excel.setCellData("Fail", 8, 4);
			Log.info("result posted over excelscheet with status as fail");
		}
		Log.info("test_Validation_With_wrong_userName_and_right_password executed");

	}

	public static void test_Validation_With_email_and_password_field_blank(WebDriver driver) throws Exception

	{

		Log.info("test_Validation_With_email_and_password_field_blank executing");

		sUsername = Excel.getCellData(9, 1);
		Log.info("username been picked up");

		sPassword = Excel.getCellData(9, 2);
		Log.info("password  been picked up");

		SigIn_action.Execute(driver, sUsername, sPassword);
		Log.info("signin action has been executed");

		if (SignIn_Page.Error_message(driver).getText()
				.equals(Excel.getCellData(9, 3))) {
			Excel.setCellData("Pass", 9, 4);
			Log.info("result posted over excelscheet with status as pass");
		} else {
			Excel.setCellData("Fail", 9, 4);
			Log.info("result posted over excelscheet with status as pass");
		}

		Log.info("test_Validation_With_email_and_password_field_blank executed");

	}

	public static void test_Validation_using_browser_back_button_post_signOut(WebDriver driver) throws Exception

	{
		Log.info("test_Validation_using_browser_back_button_post_signOut executing");

		sUsername = Excel.getCellData(10, 1);
		Log.info("username been picked up");

		sPassword = Excel.getCellData(10, 2);
		Log.info("password  been picked up");

		SigIn_action.Execute(driver, sUsername, sPassword);
		Log.info("signin action has been executed");

		Page_Header.munuLink(driver).click();
		Page_Header.signoutButton(driver).click();

		driver.navigate().back();

		Excel.setCellData("Pass", 10, 4);

		Log.info("test_Validation_using_browser_back_button_post_signOut executed");

	}

	private static boolean isElementPresent(WebElement webElement) {
		// TODO Auto-generated method stub
		return false;
	}

}

<file_sep>package appModules;

import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.sikuli.script.Key;
import org.sikuli.script.Pattern;
import org.sikuli.script.Screen;

import Utility.Constant;
import Utility.Excel;
import Utility.Log;

public class PaypalPurchase_action {

	private static String slug;
	private static int ran;
	private static String email;
	private static String password;

    static Screen s = new Screen();

	static Pattern img16 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "paypal_email.png");
	static Pattern img17 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "paypal_login.png");
	static Pattern img18 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "paypal_pay.png");
	static Pattern img19 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "paypal_close.png");
	static Pattern img20 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "paypal_password.png");

	public static void Execute(WebDriver driver) throws Exception {

		try {

			/* set another excel sheet to get the credentials */

			Excel.setExcelFile(Constant.Path_TestData
					+ Constant.File_TestData, "Credentials");
			Log.info("Get excel seet having credentilas");

			/* Get test data from excel sheet */
			String paypal_id;
			paypal_id = Excel.getCellData(1, 1);
			Log.info("Get username from excel sheet having credentials");
			String paypal_password;
			password = Excel.getCellData(1, 2);
			System.out.println(password);
			Log.info("Get password from excel seet having credentilas");

			/* Entered username and password and login to paypal */

			s.wait(img16, 100);
			s.click(img16);
			s.type(paypal_id);
			Log.info("username entered");

			s.type(Key.TAB);
			s.type("12345678");
			Log.info("password entered");

			/* Click on login */
			s.wait(img17, 100);
			s.click(img17);
			Log.info("Login button clicked");
			s.wait(img18, 100);
			Log.info("user login to paypal");

			/* Click on pay */
			s.click(img18);
			Log.info("Pay button clicked");
			s.wait(img19, 100);
			Log.info("payment made");

			/* Click close */
			s.click(img19);
			Log.info("Close button cliked");
		}

		catch (Exception e) {
			Log.error(e.getMessage());
		}

	}

}
<file_sep>package pageObject;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

import Utility.Log;

public class API_Window_Page {

	private static WebElement element  = null;

	//--------------------------------Facebook------------------------------------------//

	public static WebElement email_facebook(WebDriver driver)throws Exception
	    {
		element = driver.findElement(By.id("email"));
		Log.info("facebook email field found");
		 return element;
		}

	public static WebElement password_facebook(WebDriver driver)throws Exception
    {
	element = driver.findElement(By.id("pass"));
	Log.info("facebook password field found");
	 return element;
	}

	public static WebElement loginButton_facebook(WebDriver driver)throws Exception
    {
	element = driver.findElement(By.id("u_0_1"));
	Log.info("facebook loging button found");
	 return element;
	}

	public static WebElement share_facebook(WebDriver driver)throws Exception
    {
	element = driver.findElement(By.xpath("html/body/div[1]/form/div[2]/div[1]/button[2]"));
	Log.info("facebook share txt found");
	 return element;
	}

	//--------------------------------Twitter------------------------------------------//

	public static WebElement email_twitter(WebDriver driver)throws Exception
    {
	element = driver.findElement(By.id("username_or_email"));
	Log.info("twitter email field found");
	 return element;
	}

   public static WebElement password_twitter(WebDriver driver)throws Exception
    {
    element = driver.findElement(By.id("password"));
    Log.info("twitter pass field found");
    return element;
    }

   public static WebElement allow_twitter(WebDriver driver)throws Exception
    {
     element = driver.findElement(By.id("allow"));
     Log.info("twitter allow button found");
     return element;
    }

	//--------------------------------Drop box------------------------------------------//

	public static WebElement email_dropbox(WebDriver driver)throws Exception
    {
	element = driver.findElement(By.xpath("html/body/div[2]/div[1]/div[1]/form[1]/div[2]/div[2]/input"));
	Log.info("dropbox email field found");
	 return element;
	}

	public static WebElement password_dropbox(WebDriver driver)throws Exception
    {
	element = driver.findElement(By.xpath("html/body/div[2]/div[1]/div[1]/form[1]/div[3]/div[2]/input"));
	Log.info("dropbox pass field found");
	 return element;
	}

	public static WebElement submit_dropbox(WebDriver driver)throws Exception
    {
	element = driver.findElement(By.xpath("html/body/div[2]/div[1]/div[1]/form[1]/div[5]/button"));
	Log.info("dropbox submit button found");
	 return element;
	}

	public static WebElement allow_dropbox(WebDriver driver)throws Exception
    {
	element = driver.findElement(By.xpath("html/body/div[2]/div[3]/form/button[2]"));
	Log.info("dropbox allow button found");
	 return element;
	}

	//------------------------------------s3-----------------------------------------//

	public static WebElement access_S3(WebDriver driver)throws Exception
    {
	element = driver.findElement(By.xpath("html/body/div[1]/div/div[1]/form/ul/li[1]/input"));
	Log.info("S3 access key field found");
	 return element;
	}

	public static WebElement secretKey_S3(WebDriver driver)throws Exception
    {
	element = driver.findElement(By.xpath("html/body/div[1]/div/div[1]/form/ul/li[2]/input"));
	Log.info("S3 secret key field found");
	 return element;

	}

	public static WebElement Bucket_S3(WebDriver driver)throws Exception
    {
	element = driver.findElement(By.xpath("html/body/div[1]/div/div[1]/form/ul/li[5]/input"));
	Log.info("S3 bucket key field found");
	 return element;
	}

	public static WebElement submit_S3(WebDriver driver)throws Exception
    {
	element = driver.findElement(By.xpath("html/body/div[1]/div/div[1]/form/ul/li[6]/input"));
	Log.info("S3 submit button found");
	 return element;
	}

	//------------------------------------gDrive-----------------------------------------//

		public static WebElement email_gDrive(WebDriver driver)throws Exception
	    {
		element = driver.findElement(By.xpath("html/body/div[1]/div[2]/div[2]/form/input[14]"));
		Log.info("gdrive email field found");
		 return element;
		}

		public static WebElement password_gDrive(WebDriver driver)throws Exception
	    {
		element = driver.findElement(By.xpath("html/body/div[1]/div[2]/div[2]/form/input[15]"));
		Log.info("gdrive password field found");
		 return element;
		}

		public static WebElement submit_gDrive(WebDriver driver)throws Exception
	    {
		element = driver.findElement(By.xpath("html/body/div[1]/div[2]/div[2]/form/input[16]"));
		Log.info("gdrive submit button found");
		 return element;
		}

		public static WebElement accept_gDrive(WebDriver driver)throws Exception
	    {
		element = driver.findElement(By.id("html/body/div[2]/div/div[4]/div[3]/form/button[1]"));
		Log.info("gdrive accept button found");
		 return element;
		}

	//------------------------------------------suger Sync--------------------------------//

		public static WebElement email_sugerSync(WebDriver driver)throws Exception
	    {
		element = driver.findElement(By.xpath("html/body/div[1]/div/div[1]/form/ul/li[1]/input"));
		Log.info("sugersync email field found");
		 return element;
		}

		public static WebElement password_sugerSync(WebDriver driver)throws Exception
	    {
		element = driver.findElement(By.xpath("html/body/div[1]/div/div[1]/form/ul/li[2]/input"));
		Log.info("sugersync password field found");
		 return element;
		}

		public static WebElement submit_sugerSync(WebDriver driver)throws Exception
	    {
		element = driver.findElement(By.xpath("html/body/div[1]/div/div[1]/form/ul/li[3]/input"));
		Log.info("sugersync submit button found");
		 return element;

	    }

		//-------------------------------------oneDrive------------------//

		  public static WebElement email_oneDrive(WebDriver driver)throws Exception
	       {
		   element = driver.findElement(By.xpath("html/body/div[1]/div/div[2]/form/div[1]/div[4]/div/input"));
		   Log.info("onedrive email field found");
		   return element;
		   }

		  public static WebElement password_oneDrive(WebDriver driver)throws Exception
	       {
		    element = driver.findElement(By.xpath("html/body/div[1]/div/div[2]/form/div[1]/div[6]/div/input"));
		    Log.info("onedrive password field found");
		    return element;
		   }

		  public static WebElement submit_oneDrive(WebDriver driver)throws Exception
	       {
		    element = driver.findElement(By.xpath("html/body/div[1]/div/div[2]/form/div[2]/input"));
		    Log.info("onedrive submit button found");
		    return element;
		    }

}

<file_sep>package pageObject;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

import Utility.Log;

public class FilmDetail_Page {

	private static WebElement element = null;

	public static WebElement shareLink_Facebook(WebDriver driver){
		element = driver.findElement(By.xpath("html/body/div[1]/section[2]/article/div[1]/div/div/div[1]/a[1]/span"));
		Log.info("facebook share link found");
		return element;

	}

	public static WebElement shareLink_Twitter(WebDriver driver){
		element = driver.findElement(By.xpath("html/body/div[1]/section[2]/article/div[1]/div/div/div[1]/a[2]/span"));
		Log.info("twitter share link found");
		return element;

	}

	public static WebElement externalPurcahseLink_Buy(WebDriver driver)
	    {
		element = driver.findElement(By.xpath("html/body/div[1]/section[2]/article/div[2]/div[1]/div[2]/a[2]/span"));
		Log.info("external purchase buy button found");
		return element;
		}

	public static WebElement externalPurcahseLink_rent(WebDriver driver)
    {
	element = driver.findElement(By.xpath("html/body/div[1]/section[2]/article/div[2]/div[1]/div[2]/a[1]/span"));
	Log.info("external purchase rent button found");
	return element;
	}

	public static WebElement player_TextOnInvalidCArd(WebDriver driver)
    {
	element = driver.findElement(By.xpath("html/body/div[1]/section[1]/div/div/p"));
	Log.info("text on player for invalid card found");
	return element;
	}

	public static WebElement player_BackButtonOnInvalidCard(WebDriver driver)
    {
	element = driver.findElement(By.xpath("html/body/div[1]/section[1]/div/div/a"));
	Log.info("back button on invalid card screen found");
	return element;
	}

}
<file_sep>package pageObject;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.testng.annotations.Test;

import Utility.Log;

public class SignUp_Page {

	private static WebElement element = null;

	public static WebElement field_Email(WebDriver driver) throws Exception

	{
		try
		{
		element = driver.findElement(By.id("sf_guard_user_email_address"));
		Log.info("email field found on from");
		return element;
		}
		catch (Exception e)
		{
			Log.error("email field not found on form");
			throw(e);
		}
	}

	public static WebElement field_Password(WebDriver driver) throws Exception
	{
	try
	{
		element = driver.findElement(By.xpath(".//*[@id='sf_guard_user_password']"));
		Log.info("password field found on form");
		return element;
		}
	catch (Exception e)
	{
		Log.error("password field not found on form");
		throw(e);
	}
	}

	public static WebElement field_FullNmae(WebDriver driver) throws Exception
	{
		try
		{
		element = driver.findElement(By.id("sf_guard_user_full_name"));
		Log.info("full name field found on form");
		return element;
		}
		catch (Exception e)
		{
			Log.error("full name field not found on form");
			throw(e);
		}
		}

	public static WebElement field_DOB_Month(WebDriver driver) throws Exception
	{
		try
		{
		element = driver.findElement(By.xpath("html/body/div[2]/section/article/div/form/ul/li[7]/select[1]"));
		Log.info("dob_month field found on form");
		return element;
	}
		catch (Exception e)
		{
			Log.error("dob_month field not found on form");
			throw(e);
		}
		}

	public static WebElement Null_Value_dropdown_Month(WebDriver driver) throws Exception
	{
		try
		{
			element = driver.findElement(By.xpath("/html/body/div[2]/section/article/div/form/ul/li[7]/select/option"));
			Log.info(" null value found on drop down of DOB");
			return element;
		}

		catch (Exception e)
		{
			Log.error("null value not found on drop down of DOB");
			throw(e);
		}
		}

	public static WebElement value_DOB_Date(WebDriver driver) throws Exception
	{
		try
		{
		element = driver.findElement(By.xpath("html/body/div[2]/section/article/div/form/ul/li[7]/select[2]"));
		Log.info("value for dob_day found on drop down");
		return element;

	}
		catch (Exception e)
		{
			Log.error("value for dob_day not found on drop down");
			throw(e);
		}
		}

	public static WebElement NullValue_dropDown_Day(WebDriver driver) throws Exception
	{
		try {
		element = driver.findElement(By.xpath("/html/body/div[2]/section/article/div/form/ul/li[7]/select[2]/option"));
		Log.info(" null value found on drop down for day");
		return element;
		}
		catch (Exception e)
		{
			Log.error("null value found on drop down for day");
			throw(e);
		}
		}

	public static WebElement value_DOB_Year(WebDriver driver) throws Exception
	{
		try
		{
		element = driver.findElement(By.xpath(".//*[@id='sf_guard_user_dob_year']"));
		Log.info("value on drop dob_year found");
		return element;

	}
		catch (Exception e)
		{
			Log.error("value on drop dob_year not found");
			throw(e);
		}
		}

	public static WebElement NullValue_dropDpwn_Year(WebDriver driver) throws Exception
	{
		try
		{
		element = driver.findElement(By.xpath("/html/body/div[2]/section/article/div/form/ul/li[7]/select[3]/option"));
		Log.info("null value on drop down found on year");
		return element;
	}
		catch (Exception e)
		{
			Log.error("null value on drop down not found on year");
			throw(e);
		}
		}

	public static WebElement button_IdentifyAS(WebDriver driver) throws Exception
	{
		try
		{
		element =  driver.findElement(By.xpath(".//*[@id='sf_guard_user_gender_M']"));
		Log.info("I identify as radio button found on form");
		return element;
		}
		catch (Exception e)
		{
			Log.error("I identify as radio button not found on form");
			throw(e);
		}
		}

	public static WebElement submitButton(WebDriver driver) throws Exception
	{
		try
		{
       element = driver.findElement(By.xpath(".//*[@id='auth-form']/ul/li[9]/button[1]"));
       Log.info("submit button found on form");
       return element;
	}
		catch (Exception e)
		{
			Log.error("submit button not found on form");
			throw(e);
		}
		}

	public static WebElement ErrorMessage_BlankEmail(WebDriver driver) throws Exception
	{
		try
		{
	       element = driver.findElement(By.xpath("html/body/div[2]/section/article/div/form/div[1]/div"));
	       Log.info("text message found on form for blank email");
	       return element;
		}
		catch (Exception e)
		{
			Log.error("text message not found on form for blank mail");
			throw(e);
		}
		}

	public static WebElement ErrorMessage_Password(WebDriver driver) throws Exception
	{
		try
		{
	       element = driver.findElement(By.xpath("html/body/div[2]/section/article/div/form/div[1]/div"));
	       Log.info("text message found on form for wrong password");
	       return element;
		}
		catch (Exception e)
		{
			Log.error("text message not found on form for wrong password");
			throw(e);
		}
		}

	public static WebElement ErrorMessage_withoutDOB(WebDriver driver) throws Exception
	{
		try
		{
	       element = driver.findElement(By.xpath("html/body/div[2]/section/article/div/form/div[1]/div"));
	       Log.info("text message found on form for without DOB");
	       return element;
		}
		catch (Exception e)
		{
			Log.error("text message found on form for without DOB");
			throw(e);
		}
		}

	public static WebElement ErrorMessage_IdetifyAs(WebDriver driver) throws Exception
	{
		try
		{
	       element = driver.findElement(By.xpath("html/body/div[2]/section/article/div/form/div[1]/div"));
	       Log.info("text message found on form for I identify as");
	       return element;
		}
		catch (Exception e)
		{
			Log.error("text message not found on form for I identify as");
			throw(e);
		}
		}

	public static WebElement ErrorMessage_FullName(WebDriver driver) throws Exception
	{
		try
		{
	       element = driver.findElement(By.xpath("html/body/div[2]/section/article/div/form/div[1]/div[1]"));
	       Log.info("text message found on form for full name");
	       return element;
		}
		catch (Exception e)
		{
			Log.error("text message not found on form for full name");
			throw(e);
		}
		}

	public static WebElement ErrorMessage_lessThen13(WebDriver driver) throws Exception
	{
		try
		{
	       element = driver.findElement(By.xpath("html/body/div[2]/section/article/div/form/div[1]/div"));
	       Log.info("text message found on form on age less then 13");
	       return element;
		}
		catch (Exception e)
		{
			Log.error("text message not found on form on age less then 13");
			throw(e);
		}
		}

	public static WebElement ErrorMessage_Invalid_DOB(WebDriver driver) throws Exception
	{
		try
		{
	       element = driver.findElement(By.xpath("html/body/div[2]/section/article/div/form/div[1]/div"));
	       Log.info("text message found on form on invalid DOB");
	       return element;
		}
		catch (Exception e)
		{
			Log.error("text message found on form for invalid DDOB");
			throw(e);
		}
		}

	public static WebElement ErrorMessage_Already_Registererd_User(WebDriver driver) throws Exception
	{
		try
		{
	       element = driver.findElement(By.xpath("html/body/div[2]/section/article/div/form/div[1]/div"));
	       Log.info("text message found on form on alreday registered user");
	       return element;
		}
		catch (Exception e)
		{
			Log.error("text message not found on form on alreday registered user");
			throw(e);
		}
		}

	public static WebElement ErrorMessage_Invalid_Email(WebDriver driver) throws Exception
	{
		try
		{
	       element = driver.findElement(By.xpath("html/body/div[2]/section/article/div/form/div[1]/div"));
	       Log.info("text message found on form on invalid email");
	       return element;
		}
		catch (Exception e)
		{
			Log.error("text message found on form on invalid email");
			throw(e);
		}
		}

}

<file_sep>package pageObject;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

import Utility.Log;

public class Container_SelectUploadType {

	private static WebElement element = null;

	public static WebElement dropBox_link(WebDriver driver)throws Exception{
		element = driver.findElement(By.xpath("html/body/div[4]/div/section/div[2]/ul[1]/li[1]/p[1]/img"));
		Log.info("dropbox link found");
		return element;

	}

	public static WebElement S3_link(WebDriver driver)throws Exception{
		element = driver.findElement(By.xpath("html/body/div[4]/div/section/div[2]/ul[1]/li[2]/p[1]/img"));
		Log.info("S3 link found");
		return element;

		}

	public static WebElement gDrive_link(WebDriver driver)throws Exception{
		element = driver.findElement(By.xpath("html/body/div[4]/div/section/div[2]/ul[2]/li[1]/p[1]/img"));
		Log.info("gdrive link found");
		return element;

		}

	public static WebElement sugerSync_link(WebDriver driver)throws Exception{
		element = driver.findElement(By.xpath("html/body/div[4]/div/section/div[2]/ul[2]/li[2]/p[1]/img"));
		Log.info("sugersync link found");
		return element;

		}

	public static WebElement oneDrive_link(WebDriver driver)throws Exception{
		element = driver.findElement(By.xpath("html/body/div[4]/div/section/div[2]/ul[2]/li[3]/p[1]/img"));
		Log.info("onedrive link found");
		return element;

		}

	public static WebElement browserUpload_link(WebDriver driver)throws Exception{
		element = driver.findElement(By.xpath("html/body/div[4]/div/section/div[1]/ul/li[2]/span"));
		Log.info("browserupload link found");
		return element;

		}

	public static WebElement browserUpload_Button(WebDriver driver)throws Exception{
		element = driver.findElement(By.id("full-movie-popup"));
		Log.info("browser upload full film button found");
		return element;

		}

	public static WebElement browserUploadTrailer_Button(WebDriver driver)throws Exception{
		element = driver.findElement(By.id("trailer-movie-popup"));
		Log.info("browser upload trailer button found");
		return element;

		}

}
<file_sep>package appModules;

import org.openqa.selenium.WebDriver;

import pageObject.SignUp_Page;
import AutomationFramework.GenerateTestData;
import Utility.Constant;
import Utility.Excel;
import Utility.Log;

public class SignUp_action {

	private static final String Path_TestData = null;
	private static final String Sheet2 = null;
	private static String sUsername;
	private static String sPassword;
	private static String Fullname;
	private static String month;
	private static String day;
	private static String year;

	public SignUp_action(String sUsername, String sPassword, String Fullname, String month, String day, String year){

		this.sUsername = sUsername;
		this.sPassword = <PASSWORD>;
		this.Fullname = Fullname;
		this.month = month;
        this.day = day;
        this.year = year;
	}

   public static void Execute(WebDriver driver) throws Exception {

	   driver.get(Constant.URL+"/index.php/signup");

	   String[] generatedInfo = GenerateTestData.Execute(driver);

	    sUsername = generatedInfo[0];
	    sPassword = generatedInfo[1];
	    Fullname = generatedInfo[2];
	    month  = ("Jan");

	    SignUP(driver, sUsername, sPassword, Fullname, month);
   }

public static void SignUP(WebDriver driver, String sUsername, String sPassword, String fullname, String month) throws Exception

{
	   SignUp_Page.field_Email(driver).clear();
	   SignUp_Page.field_Email(driver).sendKeys(sUsername);

	  SignUp_Page.field_Password(driver).clear();
	  SignUp_Page.field_Password(driver).sendKeys(sPassword);

	  SignUp_Page.field_FullNmae(driver).clear();
	  SignUp_Page.field_FullNmae(driver).sendKeys(Fullname);

	  SignUp_Page.field_DOB_Month(driver).sendKeys(month);

	  SignUp_Page.value_DOB_Date(driver).sendKeys("10");

	 SignUp_Page.value_DOB_Year(driver).sendKeys("1990");

	 SignUp_Page.button_IdentifyAS(driver).click();

	 SignUp_Page.submitButton(driver).click();

}

}

<file_sep>package pageObject;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

import Utility.Log;

public class Password_Page {

	private static WebElement element = null;

	public static WebElement txt_password(WebDriver driver)
	{
		element = driver.findElement(By.xpath("html/body/div[2]/section/article/h1"));
		Log.info("text for forget password found");
		return element;
	}

	public static WebElement txt_passwordField(WebDriver driver)
	{
		element = driver.findElement(By.xpath("html/body/div[2]/section/article/form/ul/li[1]/input"));
		Log.info("forger passoword password field found");
		return element;
	}

	public static WebElement txt_passwordReset_button(WebDriver driver)
	{
		element = driver.findElement(By.xpath("html/body/div[2]/section/article/form/ul/li[2]/button"));
		Log.info("reset password button found");
		return element;
	}

}

<file_sep>package appModules;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.sikuli.script.Key;
import org.sikuli.script.Pattern;
import org.sikuli.script.Screen;

import pageObject.FilmDetail_Page;
import AutomationFramework.GenerateTestData;
import Utility.Constant;
import Utility.Excel;

public class PlayerSignUp_action {

	private static final WebDriver driver = null;
	private static String sUsername;
	private static String sPassword;
	private static String slug;
	private static String card_number;
	private static String text;
	private static WebElement element = null;

    static Pattern img1 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse+"email.png");

    static Pattern img2 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse+"submit.png");

    static Pattern img6 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse+"signIn_link.png");

    static Pattern img12 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse+"continue_rent.png");

    static Screen s = new Screen();

public static void Execute(WebDriver driver) throws Exception

{

    String[] generatedInfo = GenerateTestData.Execute(driver);

    sUsername = generatedInfo[0];
    sPassword = generatedInfo[1];

    s.wait(img1, 100);
    s.click(img1);
    s.type(img1,"TEST USER");

    s.type(Key.TAB);
    s.type(sUsername);

    s.type(Key.TAB);
    s.type(sPassword);

    s.doubleClick(img2);

 }

}
<file_sep><project name="projectname" basedir="." default="runTest">

<property name="src.dir" location="${basedir}/src" />
<property name="lib.dir" location="${basedir}/lib" />
<property name="exec.dir" location="${basedir}/exec" />
<property name="exec.bin.dir" location="${exec.dir}/bin" />
<property name="functional.base.dir" location="${basedir}/../../" />
<property name="reports.dir" location="${exec.dir}/reports" />
<property name="failure.dir" location="${exec.dir}/reports/xml" />

<path id="ft.classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
<pathelement location="${exec.dir}" />
</path>

<taskdef resource="testngtasks" classpath="${lib.dir}/testng-6.8.7.jar" />

<target name="clean">
<delete dir="${exec.dir}" />
</target>

<target name="prepare">
<mkdir dir="${exec.dir}" />
<mkdir dir="${reports.dir}/output" />

<copy todir="${exec.bin.dir}">
<fileset dir="${src.dir}" />
</copy>
</target>

<target name="compile" depends="clean, prepare">
<javac classpathref="ft.classpath" srcdir="${src.dir}" destdir="${exec.dir}" />
</target>

<target name="runTest" depends="compile">
<testng classpathref="ft.classpath" outputdir="${reports.dir}/Test 1" suitename="suite1">
<xmlfileset dir="${basedir}" includes="testng.xml"/>
</testng>
</target>

	   <target name="testng-xslt-report">
	                <delete dir="${basedir}/testng-xslt">
	                </delete>
	                <mkdir dir="${basedir}/testng-xslt">
	                </mkdir>
	                <xslt in="${basedir}/reports/TestNG/testng-results.xml" style="${basedir}/testng-results.xsl" out="${basedir}/testng-xslt/index.html">
	                    <param expression="${basedir}/testng-xslt/" name="testNgXslt.outputDir" />

	                    <param expression="true" name="testNgXslt.sortTestCaseLinks" />

	                    <param expression="FAIL,SKIP,PASS,CONF,BY_CLASS" name="testNgXslt.testDetailsFilter" />

	                    <param expression="true" name="testNgXslt.showRuntimeTotals" />

	                    <classpath refid="classpath">
	                    </classpath>
	                </xslt>
	   </target>

 </project><file_sep>package testCases;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.sikuli.script.Key;
import org.sikuli.script.Pattern;
import org.sikuli.script.Screen;

import appModules.PaypalPurchase_action;
import appModules.PlayerSignIN_action;
import appModules.PlayerSignUp_action;
import pageObject.FilmDetail_Page;
import pageObject.Page_Header;
import pageObject.UserProfilePurchase_page.UserProfile_Purchase;
import Utility.Constant;
import Utility.Excel;
import Utility.Log;

public class TestFilmPurchaseUsingPaypal {

    private static String slug;
	private static int ran;
	private static String email;
	private static String password;

    static Screen s = new Screen();

	Pattern img = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "purchase_signup.png");
	static Pattern img1 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "email.png");
	static Pattern img2 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "submit.png");
	Pattern img3 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "stripe.png");
	Pattern img4 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "pay.png");
	static Pattern img5 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "watch.png");
	static Pattern img6 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "signIn_link.png");
	Pattern img7 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "signIn_Submit.png");
	static Pattern img8 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "checkOut.png");
	static Pattern img9 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "success_screen.png");
	static Pattern img10 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "download.png");
	static Pattern img11 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "successScreen_rent.png");
	static Pattern img12 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "continue_rent.png");
	Pattern img13 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "stripeCheckOut_Invalid.png");
	static Pattern img14 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "checkout_radioOption.png");
	static Pattern img15 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "checkout_pay.png");
	static Pattern img16 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "paypal_email.png");
	static Pattern img17 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "paypal_login.png");
	static Pattern img18 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "paypal_pay.png");
	static Pattern img19 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "paypal_close.png");
	static Pattern img20 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse + "paypal_password.png");

	public TestFilmPurchaseUsingPaypal(String slug, int ran) {

		this.slug = slug;
		this.ran = ran;
		this.email = email;
		this.password = <PASSWORD>;

	}

	public static void Execute(WebDriver driver) throws Exception {

		Log.startTestCase("TestFilmPurchaseUsingPaypal");

		try {

			Excel.setExcelFile(Constant.Path_TestData+Constant.File_TestData,"purchase_paypal");
            Log.info("Set excel sheet to read test data");

			Screen s = new Screen();

			 testPurchase_after_signup(driver);
	    	 testPurchase_after_signin(driver);
	    	 testRent_after_signin(driver);

		}

		catch (Exception e) {

			Log.error(e.getMessage());
		}

	}

	public static void testPurchase_after_signup(WebDriver driver) throws Exception

	{
		Log.startTestCase("testPurchase_after_signup");

		try

		{

			/* Taking slug from excel sheet to open films detail page */
			slug = Excel.getCellData(1, 3);
			Log.info("test data for film slug set");

			/* opening details page */

			driver.get(Constant.URL + "/index.php/video/" + slug);
			Log.info("films detail page opened");

			/* Click on external purchase link */
			FilmDetail_Page.externalPurcahseLink_Buy(driver).click();
			Log.info("External buy button clicked");

			/* Sigup within player */
			PlayerSignUp_action.Execute(driver);
		    Log.info("User signup within player");

			if (s.exists(img8) != null) {
				Excel.setCellData("Pass", 1, 8);
				Log.info("Chek out screen present");

			} else {
				Excel.setCellData("Fail", 1, 8);
				Log.error("Missing check out screen");
			}

			/* Click on radio button to select paypal */
			s.click(img14);
			Log.info("radio button clicked");

			/* click on pay button of checkout form to open the paypal window */
			s.click(img15);
			Log.info("Pay button clicked");

			/* Purchase flow */
			PaypalPurchase_action.Execute(driver);
			Log.info("Purchase flow completed");

			/* set pay_pal excel sheet to log test result */
			Excel.setExcelFile(Constant.Path_TestData
					+ Constant.File_TestData, "purchase_paypal");

			/* Wait for success screen */
			s.wait(img9, 100);

			if (s.exists(img9) != null) {
				Excel.setCellData("Pass", 2, 8);
				Log.info("Success screen find, purchase made");

			} else {
				Excel.setCellData("Fail", 2, 8);
				Log.error("Success screen not found");

			}

			/* Check for watch and download link on success screen */

			if (s.exists(img5) != null && s.exists(img10) != null) {
				Excel.setCellData("Pass", 3, 8);
				Log.info("Watch and download button found");
			} else {
				Excel.setCellData("Fail", 3, 8);
				Log.error("Watch and download button not found");
			}

			/* Click on download button */
			s.click(img10);
			Log.info("Download button clicked");

			/* waiting to get redirected */
			WebElement element = (new WebDriverWait(driver, 10))
					.until(ExpectedConditions
							.elementToBeClickable(UserProfile_Purchase
									.filmIHaveOwn(driver)));

			/* Getting page title */
			String filmname = driver.getTitle();
			System.out.println(filmname);

			if (password.equals(Excel.getCellData(4, 7))) {
				Excel.setCellData("Pass", 4, 8);
				Log.info("redirected to profile purchase");
			} else {
				Excel.setCellData("Fail", 4, 8);
				Log.info("not redirected to profile purchase");
			}

			WebElement element2 = (new WebDriverWait(driver, 10))
					.until(ExpectedConditions
							.elementToBeClickable(Page_Header.munuLink(driver)));

			Page_Header.munuLink(driver).click();
            Log.info("Menu opened");

  	      Page_Header.signoutButton(driver).click();
  	      Log.info("Clciked on signout");

		}

		catch (Exception e) {
			Log.error(e.getMessage());
		}

		Log.endTestCase("TC_001_purchase_as_new_user");

	}

	public static void testPurchase_after_signin(WebDriver driver) throws Exception {

		Log.startTestCase("testPurchase_after_signin");

		try {

			/* Get test data from excel */
			slug = Excel.getCellData(6, 3);
			Log.info("test data as film slug set");

			/* openeing film detail page as per tets data */
			driver.get(Constant.URL + "/index.php/video/" + slug);
			Log.info("films detail page opened");

			/* click on external purchase link */
			FilmDetail_Page.externalPurcahseLink_Buy(driver).click();
			Log.info("external purchase link clicked");

			PlayerSignIN_action.Execute(driver);

			/* verify checkout form */

			if (s.exists(img8) != null) {
				Excel.setCellData("Pass", 6, 8);
				Log.info("Check out open");
			} else {
				Excel.setCellData("Fail", 6, 8);
				Log.info("Check out not open");
			}

			/* Click on radio button to select paypal */
			s.click(img14);
			Log.info("radio button clicked");

			/* click on pay button of checkout form to open the paypal window */
			s.click(img15);
			Log.info("Pay button clicked");

			/* Wait for paypal window to open */
			s.wait(img20, 100);

			/* Enter password */
			s.click(img20);
			Log.info("Paypal window opened");
			s.type("<PASSWORD>");
			Log.info("password entered");

			/* Click on login */
			s.wait(img17, 100);
			s.click(img17);
			Log.info("Login button clicked");
			s.wait(img18, 100);
			Log.info("user login to paypal");

			/* Click on pay */
			s.click(img18);
			Log.info("Pay button clicked");
			s.wait(img19, 100);
			Log.info("payment made");

			/* Click close */
			s.click(img19);
			Log.info("Close button cliked");

			/* set pay_pal excel sheet to log test result */
			Excel.setExcelFile(Constant.Path_TestData
					+ Constant.File_TestData, "purchase_paypal");

			/* Wait for success screen */
			s.wait(img9, 100);

			if (s.exists(img9) != null) {
				Excel.setCellData("Pass", 7, 8);
				Log.info("Success screen find, purchase made");

			} else {
				Excel.setCellData("Pass", 7, 8);
				Log.error("Success screen not found");

			}

			/* Check for watch and download link on success screen */

			if (s.exists(img5) != null && s.exists(img10) != null) {
				Excel.setCellData("Pass", 8, 8);
				Log.info("Watch and download button found");
			} else {
				Excel.setCellData("Pass", 8, 8);
				Log.error("Watch and download button not found");
			}

			/* Click on download button */
			s.click(img10);
			Log.info("Download button clicked");

			/* waiting to get redirected */
			WebElement element = (new WebDriverWait(driver, 10))
					.until(ExpectedConditions
							.elementToBeClickable(UserProfile_Purchase
									.filmIHaveOwn(driver)));

			/* Getting page title */
			String filmname = driver.getTitle();
			System.out.println(filmname);

			if (filmname.equals(Excel.getCellData(4, 7))) {
				Excel.setCellData("Pass", 9, 8);
				Log.info("redirected to profile purchase");
			} else {
				Excel.setCellData("Fail", 9, 8);
				Log.info("not redirected to profile purchase");
			}
		}

		catch (Exception e) {
			Log.error(e.getMessage());
		}

		Log.endTestCase("TC_002_purchaseing_as_registered_user");

	}

	  public static void testRent_after_signin(WebDriver driver) throws Exception {

			Log.startTestCase("TC_003_renting_film");

			try {
				/* Get test data from excel */
				slug = Excel.getCellData(16, 3);
				Log.info("test dada as film slug set");

				/* openeing film detail page as per tets data */
				driver.get(Constant.URL + "/index.php/video/" + slug);
				Log.info("films detail page opened");

				/* click on external purchase link */
				FilmDetail_Page.externalPurcahseLink_Buy(driver).click();
				Log.info("external purchase link clicked");

				PlayerSignIN_action.Execute(driver);

				/* verify checkout form */

				if (s.exists(img8) != null) {
					Excel.setCellData("Pass", 16, 8);
					Log.info("Check out open");
				} else {
					Excel.setCellData("Fail", 16, 8);
					Log.info("Check out not open");
				}

				/*Click on external rent button*/
				FilmDetail_Page.externalPurcahseLink_rent(driver).click();

				/* Click on radio button to select paypal */
				s.click(img14);
				Log.info("radio button clicked");

				/* click on pay button of checkout form to open the paypal window */
				s.click(img15);
				Log.info("Pay button clicked");

				/* Wait for paypal window to open */
				s.wait(img20, 100);

				/* Enter password */
				s.click(img20);
				Log.info("Paypal window opened");
				s.type("<PASSWORD>");
				Log.info("password entered");

				/* Click on login */
				s.wait(img17, 100);
				s.click(img17);
				Log.info("Login button clicked");
				s.wait(img18, 100);
				Log.info("user login to paypal");

				/* Click on pay */
				s.click(img18);
				Log.info("Pay button clicked");
				s.wait(img19, 100);
				Log.info("payment made");

				/* Click close */
				s.click(img19);
				Log.info("Close button cliked");

				/* set pay_pal excel sheet to log test result */
				Excel.setExcelFile(Constant.Path_TestData
						+ Constant.File_TestData, "purchase_paypal");

				/* Wait for success screen */
				s.wait(img9, 100);

				if (s.exists(img9) != null) {
					Excel.setCellData("Pass", 17, 8);
					Log.info("Success screen find, purchase made");

				} else {
					Excel.setCellData("Pass", 17, 8);
					Log.error("Success screen not found");

				}

				/* Check for watch and download link on success screen */

				if (s.exists(img5) != null && s.exists(img10) != null) {
					Excel.setCellData("Pass", 18, 8);
					Log.info("Watch and download button found");
				} else {
					Excel.setCellData("Pass", 18, 8);
					Log.error("Watch and download button not found");
				}

				/* Click on download button */
				s.click(img10);
				Log.info("Download button clicked");

				/* waiting to get redirected */
				WebElement element = (new WebDriverWait(driver, 10))
						.until(ExpectedConditions
								.elementToBeClickable(UserProfile_Purchase
										.filmIHaveOwn(driver)));

				/* Getting page title */
				String filmname = driver.getTitle();
				System.out.println(filmname);

				if (filmname.equals(Excel.getCellData(4, 7))) {
					Excel.setCellData("Pass", 19, 8);
					Log.info("redirected to profile purchase");
				} else {
					Excel.setCellData("Fail", 19, 8);
					Log.info("not redirected to profile purchase");
				}
			}

			catch (Exception e) {
				Log.error(e.getMessage());
			}

			Log.endTestCase("TC_002_purchaseing_as_registered_user");

		}

	public static void signOut(WebDriver driver) throws Exception {

		try {
			/* Click on menu */
			Page_Header.munuLink(driver).click();
			Log.info("Menu opened");

			/* Click on signout link */
			Page_Header.signoutButton(driver).click();
			Log.info("Signout clicked");

			/* Wait for user to signout */

			WebElement element2 = (new WebDriverWait(driver, 10))
					.until(ExpectedConditions.elementToBeClickable(Page_Header
							.signIN_link(driver)));
			Log.info("user signout");
		}

		catch (Exception e) {
			Log.error(e.getMessage());
		}
	}

}
<file_sep>package testCases;

import org.openqa.selenium.WebDriver;

import appModules.SignUp_action;
import pageObject.SignUp_Page;
import Utility.Constant;
import Utility.Excel;
import Utility.Log;

public class TestSignUp_Email {

	private static final String Path_TestData = null;
	private static final String Sheet2 = null;
	private static String email;
	private static String password;
	private static String fullname;
	private static String month;
	private static String day;
	private static String year;

	public TestSignUp_Email(String email, String password, String fullname, String month, String day, String year){

		this.email = email;
		this.password = <PASSWORD>;
		this.fullname = fullname;
		this.month = month;
        this.day = day;
        this.year = year;
	}

	public static void Execute(WebDriver driver)throws Exception{

		//** Setting data sheet

		Excel.setExcelFile(Constant.Path_TestData+Constant.File_TestData,"signUp");
		Log.info("Excel sheet for signup set to fetch test data");

		for(int i = 1; i<=14 ; i++)
		{
			 email = Excel.getCellData(i, 2);
		     password = Excel.getCellData(i, 3);
	         fullname = Excel.getCellData(i, 4);
	         month = (Excel.getCellData(i, 6));

	         SignUp_action.Execute(driver);

	         String x = "Fail";

	         if(SignUp_Page.ErrorMessage_BlankEmail(driver).getText().equals(Excel.getCellData(i, 8)))
	        		 {
	        	            x = "Pass";
	        		 }
	                     Excel.setCellData(x, i, 9);
		}

	}

}
	<file_sep>[SuiteResult context=AutomationFramework]<file_sep>package appModules;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.sikuli.script.Key;
import org.sikuli.script.Pattern;
import org.sikuli.script.Screen;

import AutomationFramework.GenerateTestData;
import Utility.Constant;
import Utility.Excel;
import Utility.Log;

public class PlayerSignIN_action {

	private static final WebDriver driver = null;
	private static String sUsername;
	private static String sPassword;
	private static String slug;
	private static String card_number;
	private static String text;
	private static WebElement element = null;

    static Pattern img1 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse+"email.png");
    static Pattern img6 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse+"signIn_link.png");
    static Pattern img12 = new Pattern(Constant.Path_TestData+Constant.Img_TestDataPurcahse+"continue_rent.png");

    static Screen s = new Screen();

public static void Execute(WebDriver driver) throws Exception

{

	Excel.setExcelFile(Constant.Path_TestData + Constant.File_TestData,"TestingData" );

	sUsername = Excel.getCellData(1, 1);
	sPassword = Excel.getCellData(1, 2);

     s.wait(img1, 100);
     Log.info("Signup screen opened");

     s.click(img6);
     Log.info("Click on signin link");

     s.click(img1);                        // SignIN  form
	 s.type(sUsername);
     Log.info("Email Entererd");

     s.type(Key.TAB);

     System.out.println(sPassword);
     s.type(sPassword);
     Log.info("Password eneterd");

     s.doubleClick(img12);
     Log.info("Clicked on signin");
}

}<file_sep>package appModules;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.sikuli.script.Pattern;
import org.sikuli.script.Screen;

import pageObject.API_Window_Page;
import pageObject.ContainerCloudUpload;
import pageObject.Container_SelectUploadType;
import pageObject.FilmCreate_Page;
import Utility.Constant;
import Utility.Excel;

public class CloudUpload_action {

    	private	static String email;
    	private	static String password;
    	private	static String fullname;
    	private	static String month;
    	private	static String day;
    	private	static String year;

    	  private static WebElement element;

    	  static Pattern img = new Pattern(Constant.Path_TestData+Constant.Img_TestDataUploads+"gdrive_accept.png");

    	  public CloudUpload_action(String email, String password, WebElement element){

    		  this.email = email;
    		  this.password = <PASSWORD>;
    		  this.element = element;
    	  }

	   public static void Execute(WebDriver driver) throws Exception

	   {

		   uploadUsingCrop(driver);

		   dropBox_Upload_action(driver);
		   associated_dropbox(driver);

		   s3_Upload_action(driver);
		   associated_S3(driver);

		   gdriver_Upload_action(driver);
		   associated_gdrive(driver);

		   sugerSync_Upload_action(driver);
		   associated_sugerSync(driver);

		   oneDriver_Upload_action(driver);
		   associated_oneDrive(driver);

	  }

               public static void dropBox_Upload_action(WebDriver driver) throws Exception

               {

                String Parent_window = driver.getWindowHandle();

         		Container_SelectUploadType.dropBox_link(driver).click();

         		for(String WinHandle : driver.getWindowHandles())
         		{
         			driver.switchTo().window(WinHandle);
         		}

         		Excel.setExcelFile(Constant.Path_TestData+Constant.File_TestData,"Credentials");

         		email = Excel.getCellData(3, 1);
         		password = Excel.getCellData(3, 2);

         		driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);

         		API_Window_Page.email_dropbox(driver).clear();
         		API_Window_Page.email_dropbox(driver).sendKeys(email);
         		API_Window_Page.password_dropbox(driver).sendKeys(password);;

         		API_Window_Page.submit_dropbox(driver).click();

         		driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);

         		API_Window_Page.allow_dropbox(driver).click();

         		driver.switchTo().window(Parent_window);

         		 element = (new WebDriverWait(driver, 10))
         				   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.filmContainer_dropbox(driver)));

         		 element = (new WebDriverWait(driver, 10))
         				   .until(ExpectedConditions.elementToBeClickable( ContainerCloudUpload.film_dropbox(driver)));

         		ContainerCloudUpload.film_dropbox(driver).click();

         		ContainerCloudUpload.Select_Button_DropBox(driver).click();

         		  }

             public static void associated_dropbox(WebDriver driver) throws Exception

             {

            	 String Parent_window = driver.getWindowHandle();

            	 Container_SelectUploadType.dropBox_link(driver).click();

            	   for(String WinHandle : driver.getWindowHandles())
            		   {

            		   driver.switchTo().window(WinHandle);

            		   }

           		        driver.switchTo().window(Parent_window);

           			   element = (new WebDriverWait(driver, 10))
         				   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.filmContainer_dropbox(driver)));

   		          ContainerCloudUpload.film_dropbox(driver).click();

   		         ContainerCloudUpload.Select_Button_DropBox(driver).click();

             }

             public static void uploadUsingCrop(WebDriver driver) throws Exception
             {

            	 element = (new WebDriverWait(driver, 10))
         				   .until(ExpectedConditions.elementToBeClickable(FilmCreate_Page.textbox_cropChekout(driver)));

            	 FilmCreate_Page.textbox_cropChekout(driver).click();

              }

             public static void s3_Upload_action(WebDriver driver) throws Exception{

            	 String Parent_window1 = driver.getWindowHandle();

        		 Container_SelectUploadType.S3_link(driver).click();

        		 for (String WinHandles1 : driver.getWindowHandles())
        		 {
        		      driver.switchTo().window(WinHandles1);
        	     }

        		 Excel.setExcelFile(Constant.Path_TestData+Constant.File_TestData,"Credentials");

        		 String accessKey = Excel.getCellData(4, 1);
        		 String secretKey = Excel.getCellData(4, 2);
        		 String bucketName = Excel.getCellData(4, 3);

        		 API_Window_Page.access_S3(driver).sendKeys(accessKey);
        		 API_Window_Page.secretKey_S3(driver).sendKeys(secretKey);
        		 API_Window_Page.Bucket_S3(driver).sendKeys(bucketName);

        		 API_Window_Page.submit_S3(driver).click();

        		 driver.switchTo().window(Parent_window1);

        		  element = (new WebDriverWait(driver, 10))
        		 		   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.filmContainer_S3(driver)));

        		  element = (new WebDriverWait(driver, 10))
        				   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.film_S3(driver)));

        		 ContainerCloudUpload.film_S3(driver).click();

        		 ContainerCloudUpload.Select_Button_S3(driver).click();
             }

             public static void associated_S3(WebDriver driver) throws Exception

             {

            	 String Parent_window1 = driver.getWindowHandle();

            	 Container_SelectUploadType.S3_link(driver).click();

            	 for (String WinHandles1 : driver.getWindowHandles())
        		 {
        		      driver.switchTo().window(WinHandles1);
        	     }

            	 driver.switchTo().window(Parent_window1);

       	          element = (new WebDriverWait(driver, 50))
       				   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.filmContainer_S3(driver)));

       	          element = (new WebDriverWait(driver, 10))
       				   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.film_S3(driver)));

       		      ContainerCloudUpload.film_S3(driver).click();

       		      ContainerCloudUpload.Select_Button_S3(driver).click();

            	   }

             public static void gdriver_Upload_action(WebDriver driver) throws Exception {

            	 String Parent_window2 = driver.getWindowHandle();

    			 Container_SelectUploadType.gDrive_link(driver).click();

    			 for(String WinHandles2 : driver.getWindowHandles())
    			 {
    				 driver.switchTo().window(WinHandles2);
    			 }

    			 Excel.setExcelFile(Constant.Path_TestData+Constant.File_TestData,"Credentials");

    		          email = Excel.getCellData(5, 1);
    		          password = Excel.getCellData(5, 2);

    			 API_Window_Page.email_gDrive(driver).sendKeys(email);
    			 API_Window_Page.password_gDrive(driver).sendKeys(password);

    			 API_Window_Page.submit_gDrive(driver).click();

    		      Screen s = new Screen();
    		      s.wait(img ,100);
    		      s.click(img);

    			 driver.switchTo().window(Parent_window2);

    		     element = (new WebDriverWait(driver, 50))
    					   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.filmContainer_gDrive(driver)));

                    element = (new WebDriverWait(driver, 50))
    					   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.film_gDrive(driver)));

    			 ContainerCloudUpload.film_gDrive(driver).click();

    			 ContainerCloudUpload.Select_Button_gDrive(driver).click();

             }

             public static void associated_gdrive(WebDriver driver) throws Exception

             {
                  String Parent_window2 = driver.getWindowHandle();

                  Container_SelectUploadType.gDrive_link(driver).click();

    			 for(String WinHandles2 : driver.getWindowHandles())
    			 {
    				 driver.switchTo().window(WinHandles2);
    			 }

    			 driver.switchTo().window(Parent_window2);

    			 element = (new WebDriverWait(driver, 10))
    					   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.filmContainer_gDrive(driver)));

    			 ContainerCloudUpload.film_gDrive(driver).click();

    			 ContainerCloudUpload.Select_Button_gDrive(driver).click();

             }

             public static void sugerSync_Upload_action(WebDriver driver) throws Exception

             {
            	 String Parent_window3 = driver.getWindowHandle();

   			  Container_SelectUploadType.sugerSync_link(driver).click();

   			  for(String WinHandles2 : driver.getWindowHandles())
   			  {
   				 driver.switchTo().window(WinHandles2);
   			  }

   			  Excel.setExcelFile(Constant.Path_TestData+Constant.File_TestData,"Credentials");

   			  email = Excel.getCellData(6, 1);
   			  password =  Excel.getCellData(6, 2);

   			 API_Window_Page.email_sugerSync(driver).sendKeys(email);
   			 API_Window_Page.password_sugerSync(driver).sendKeys(password);

   			 API_Window_Page.submit_sugerSync(driver).click();

   			 driver.switchTo().window(Parent_window3);

   			 element = (new WebDriverWait(driver, 10))
   					   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.filmContainer_sugerSync(driver)));

   			 element = (new WebDriverWait(driver, 10))
   					   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.form_sugerSync(driver)));

   			 ContainerCloudUpload.form_sugerSync(driver).click();

   			 element = (new WebDriverWait(driver, 10))
   					   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.film_sugerSync(driver)));

   			 ContainerCloudUpload.film_sugerSync(driver).click();

   			 ContainerCloudUpload.Select_Button_sugerSync(driver).click();

             }

             public static void associated_sugerSync(WebDriver driver) throws Exception

             {
            	 String Parent_window2 = driver.getWindowHandle();

            	 Container_SelectUploadType.sugerSync_link(driver).click();

   			 for(String WinHandles2 : driver.getWindowHandles())
   			 {
   				 driver.switchTo().window(WinHandles2);
   			 }

   			 driver.switchTo().window(Parent_window2);

   			element = (new WebDriverWait(driver, 10))
					   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.filmContainer_sugerSync(driver)));

            	 element = (new WebDriverWait(driver, 10)
    					   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.form_sugerSync(driver))));

    			 ContainerCloudUpload.form_sugerSync(driver).click();

    			 element = (new WebDriverWait(driver, 10))
    					   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.film_sugerSync(driver)));

    			 ContainerCloudUpload.film_sugerSync(driver).click();

    			 ContainerCloudUpload.Select_Button_sugerSync(driver).click();

             }

             public static void oneDriver_Upload_action(WebDriver driver) throws Exception

             {

            	 String Parent_window4 = driver.getWindowHandle();

   			    Container_SelectUploadType.oneDrive_link(driver).click();

   			     for(String WinHandles2 : driver.getWindowHandles())
   			     {
   				 driver.switchTo().window(WinHandles2);
   			     }

   			  Excel.setExcelFile(Constant.Path_TestData+Constant.File_TestData,"Credentials");

   			  email = Excel.getCellData(7, 1);
   			  password =  Excel.getCellData(7, 2);

   			 API_Window_Page.email_oneDrive(driver).sendKeys(email);
   			 API_Window_Page.password_oneDrive(driver).sendKeys(password);

   			 API_Window_Page.submit_oneDrive(driver).click();

   			 driver.switchTo().window(Parent_window4);

   			 element = (new WebDriverWait(driver, 10))
   					   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.filmContainer_oneDrive(driver)));

   			 element = (new WebDriverWait(driver, 10))
   					   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.film_oneDrive(driver)));

   			 ContainerCloudUpload.film_oneDrive(driver).click();

   			 ContainerCloudUpload.Submit_Button_oneOrive(driver).click();
             }

             public static void associated_oneDrive(WebDriver driver) throws Exception

             {

                 Container_SelectUploadType.oneDrive_link(driver).click();

           	       element = (new WebDriverWait(driver, 10))
    					   .until(ExpectedConditions.elementToBeClickable(ContainerCloudUpload.filmContainer_oneDrive(driver)));

    			 ContainerCloudUpload.film_oneDrive(driver).click();

    			 ContainerCloudUpload.Submit_Button_oneOrive(driver).click();

             }

      }

branch_name: refs/heads/master

languages:
Java
Ant Build System
INI

repo_language: Java

repo_name: tarun-allies/test


text:
<file_sep><?php
namespace Kizilare\Api\Togglr;

class Abstracted
{
    const API_URL = 'https://www.toggl.com/api/v8/';

    protected $api_key;

    protected $workspace_id;

    final public function __construct( $apikey )
    {
        $this->api_key = $apikey;
    }

    public function setWorkspace( $workspace_id )
    {
        $this->workspace_id = $workspace_id;
    }

    /**
     * @param string $url
     * @param null   $data
     *
     * @return mixed
     */
    protected function requestApi( $url, $data = null )
    {
        $url = self::API_URL . $url;
        $curl_handler = curl_init( $url );
        curl_setopt( $curl_handler, CURLOPT_RETURNTRANSFER, 1 );
        curl_setopt( $curl_handler, CURLOPT_SSL_VERIFYPEER, false );
        if ($data) {
            curl_setopt( $curl_handler, CURLOPT_POSTFIELDS, json_encode( $data ) );
        } else {
            curl_setopt( $curl_handler, CURLOPT_POST, 0 );
        }
        curl_setopt( $curl_handler, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json' ) );
        curl_setopt( $curl_handler, CURLOPT_USERPWD, $this->api_key . ':api_token' );
        $response = curl_exec( $curl_handler );
        return json_decode( $response, true );
    }
}<file_sep><?php

namespace Kizilare\Api\Togglr;

/**
 * Class Write
 *
 * @package Kizilare\Api\Togglr
 */
Class Write extends Abstracted
{
    /**
     * Switches the current activity for a new one.
     *
     * @param string $message Message for the new task.
     * @param string $project_id Project ID for the new task, it keeps the same if none specified.
     */
    public function switchTask( $message, $project_id = null )
    {
        $read = new Read( $this->api_key );
        if ($project_id == null) {
            $project_id = $read->getRunningProjectId();
        }
        $new_data = array(
            'time_entry' => array(
                'description' => $message,
                'pid'         => $project_id
            )
        );
        $this->requestApi( 'time_entries/start', $new_data );
    }
}
<file_sep><?php
namespace Kizilare\Api\Togglr;

/**
 * Class Read
 *
 * @package Kizilare\Api\Togglr
 */
class Read extends Abstracted
{
    /**
     * Gets the identifier for the current running project.
     *
     * @return integer
     */
    public function getRunningProjectId()
    {
        if (false == $entry = $this->getCurrentTimeEntry()) {
            return 0;
        }
        return $entry['pid'];
    }

    /**
     * Gets the details for the current project running.
     *
     * @return array
     */
    public function getCurrentTimeEntry()
    {
        $entry = $this->requestApi( 'time_entries/current' );
        if (empty( $entry['data'] )) {
            return false;
        }
        return $entry['data'];
    }

    /**
     * Return current user information.
     *
     * @return array
     */
    public function getUser()
    {
        return $this->requestApi( 'me' );
    }

    /**
     * Gets the list of projects for the current workspace.
     *
     * @return array
     */
    public function getProjects()
    {
        $projects_data = $this->requestApi( 'workspaces/' . $this->workspace_id . '/projects' );
        return $this->groupCollection( $projects_data, 'id' );
    }

    /**
     * Get a summary of a day.
     *
     * @param $date
     * @return mixed
     */
    public function getDayDetails( $date )
    {
        $projects = $this->getProjects();

        $week = date( 'W', $date );
        $year = date( 'Y', $date );
        $from = date( "Y-m-d", strtotime( "{$year}-W{$week}-1" ) );
        $to = date( "Y-m-d", strtotime( "{$year}-W{$week}-7" ) );
        $params = http_build_query(
            array(
                'start_date' => $from . 'T00:00:00+01:00',
                'end_date'   => $to . 'T23:59:59+01:00'
            )
        );
        $entries_data = $this->requestApi( 'time_entries?' . $params );

        foreach ($entries_data as & $entry) {
            $entry['project'] = $projects[$entry['pid']]['name'];
            $entry['project_id'] = $entry['pid'];
        }

        return $entries_data;
    }

    /**
     * Groups elements by main key.
     *
     * @param array $collection List of elements to group.
     * @param string $use_key Key used for the group.
     * @return array
     */
    protected function groupCollection( $collection, $use_key )
    {
        $result = array();
        foreach ($collection as $data) {
            $key = $data[$use_key];
            $result[$key] = $data;
        }
        return $result;
    }

}<file_sep>kizilare-api-togglr
===================

languages: Markdown PHP

repo_language: Markdown

repo_name: borjaeu/kizilare-api-togglr