<repo_name>smadhumitha11/AutomationFramework<file_sep>/src/main/java/AutomationFramework/pages/LoginPage.java
/*Author : <NAME>
 
 ************************************************************************* 
 
Elements of Login Page is identified and Actions for login page defined 

 ************************************************************************* 
 */
package AutomationFramework.pages;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import AutomationFramework.Base.BaseTest;

public class LoginPage extends BaseTest {
	@FindBy(xpath = "//input[@name='login']")
	WebElement signIn;
	@FindBy(xpath = "//input[@name='userName']")
	WebElement userName;
	@FindBy(xpath = "//input[@name='password']")
	WebElement passWord;
	// Initializing the Page Objects:  	
	public LoginPage() {
		PageFactory.initElements(driver, this);
	}	
	//Actions
	public void login(String un, String pwd) {
		userName.sendKeys(un);
		passWord.sendKeys(pwd);
		signIn.click();
	}
}<file_sep>/README.md
# Page Object model Test automation framework using Selenium with Java, TestNG and Gradle-

#Dependency
Java
Gradle

###libraries used
Selenium
TestNG
Extent Reports
<file_sep>/test-output/old/Amazon Automation Test Suite/Amazon Automation Test Suite.properties
[SuiteResult context=Amazon Automation Test Suite]<file_sep>/src/main/java/AutomationFramework/pages/HomePage.java
/*Author : <NAME>
 
 ************************************************************************* 
 
Elements of Home Page is identified and Actions for login page defined 

 ************************************************************************* 
 */
package AutomationFramework.pages;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import AutomationFramework.Base.BaseTest;

public class HomePage extends BaseTest {
    	@FindBy(xpath = "//a[contains(text(),'SIGN')]")
    	WebElement signIn;
    	@FindBy(xpath = "//img[contains(@alt,'Mercury Tours')]")
    	WebElement companyLogo;
    	@FindBy(xpath = "//a[contains(text(),'your destination')]")
    	WebElement destinationSearch;
    	// Initializing the Page Objects:  	
    	public HomePage() {
    		PageFactory.initElements(driver, this);
    	}	
    	//Actions
    	public boolean validateCompanyLogo(){
    		return companyLogo.isDisplayed();
    	}
    	public boolean validatedestinationSearch(){
    		return destinationSearch.isDisplayed();
    	}
    	public boolean validateSignInClick(){
    		return signIn.isDisplayed();
    	}
    	public DestinationPage destinationClick(){
    		destinationSearch.click();  
    		return new DestinationPage(); 
    	} 	 
} <file_sep>/build.gradle
/*
 * This file was generated by the Gradle 'init' task.
 *
 * This generated file contains a sample Java Library project to get you started.
 * For more details take a look at the Java Libraries chapter in the Gradle
 * User Manual available at https://docs.gradle.org/5.6.1/userguide/java_library_plugin.html
 */

plugins {
    // Apply the java-library plugin to add support for Java Library
    id 'java-library'
}

repositories {
    // Use jcenter for resolving dependencies.
    // You can declare any Maven/Ivy/file repository here.
    jcenter()	
}

dependencies {
// https://mvnrepository.com/artifact/commons-io/commons-io
compile group: 'commons-io', name: 'commons-io', version: '2.6'

// https://mvnrepository.com/artifact/org.testng/testng
testCompile group: 'org.testng', name: 'testng', version: '7.0.0'

// https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java
compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '3.141.59'

// https://mvnrepository.com/artifact/org.apache.poi/poi
compile group: 'org.apache.poi', name: 'poi', version: '4.1.0'

// https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml
compile group: 'org.apache.poi', name: 'poi-ooxml', version: '4.1.0'

// https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml-schemas
compile group: 'org.apache.poi', name: 'poi-ooxml-schemas', version: '4.1.0'

// https://mvnrepository.com/artifact/org.apache.poi/poi-scratchpad
compile group: 'org.apache.poi', name: 'poi-scratchpad', version: '4.1.0'

// https://mvnrepository.com/artifact/com.relevantcodes/extentreports
compile group: 'com.relevantcodes', name: 'extentreports', version: '2.41.2'

// https://mvnrepository.com/artifact/com.aventstack/extentreports-testng-adapter
compile group: 'com.aventstack', name: 'extentreports-testng-adapter', version: '1.0.3'
}

test { //this is the gradle task to be executed
  useTestNG() { //Tells Gradle to use TestNG  
    useDefaultListeners = true  
    suites 'src/main/resources/testng.xml'
     }
}
