<file_sep>#Tue Dec 17 10:22:46 IST 2019
org.eclipse.core.runtime=2
org.eclipse.platform=4.11.0.v20190307-0500
<file_sep>package qa.com.test.scenarios;

import qa.com.baseclass.Baseclass;
import qa.com.pages.BuyerRegistrationPage;
import qa.com.pages.LaunchPage;

public class BuyerRegistrationScenario extends Baseclass {

	LaunchPage pageObjBuyer = new LaunchPage();
	BuyerRegistrationPage pageObjBuyer1=new BuyerRegistrationPage();
	

	public void buyerRegistration(String companyName, String sellerName) throws InterruptedException {
		// TODO Auto-generated method stub
		
		
		pageObjBuyer.BusinessButtonLinkClick();
		
		pageObjBuyer1.setCompanyName(companyName);
		Thread.sleep(2000);
		//pageObjBuyer1.setSellerName(sellerName);
		pageObjBuyer1.clickProceed();
		Thread.sleep(10000);
		
			
	}
	
	
	
	
	
	
}
<file_sep>package qa.com.test.testcases;

import org.testng.annotations.Test;

import qa.com.baseclass.Baseclass;

import qa.com.test.scenarios.BlogListingScenario;

public class BlogListingTestcase  extends Baseclass{

	 @Test
		
	//BLOG LISTING	TESTCASE
	public static void BlogListingTest()
	{

		
	BlogListingScenario objBlog =new BlogListingScenario();
   objBlog.blogListingScenario();
   
  	
	}

}
<file_sep>package qa.com.pages;

import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

import qa.com.baseclass.Baseclass;

public class BuyerRegistrationPage extends Baseclass{

	WebDriverWait wait = new WebDriverWait(driver, 20);
	By buyerName;
	By sellerNameText;
	//By buyerCardEnterButton;
	
	public BuyerRegistrationPage()
	{


		buyerName=By.xpath("//*[@id='company']");
		sellerNameText=By.xpath("//*[@id='name']");
		//buyerCardEnterButton=By.xpath("//button[contains(text(),'ENTER')]");
		
		
	}
		public void setCompanyName(String companyName) {


			WebDriverWait some_element = new WebDriverWait(driver,100); 
			some_element.until(ExpectedConditions.visibilityOfElementLocated(buyerName)); 

			driver.findElement(buyerName).sendKeys(companyName);


		}	
	
	/*
	 * public void setSellerName(String sellerName) {
	 * 
	 * 
	 * WebDriverWait some_element = new WebDriverWait(driver,100);
	 * 
	 * some_element.until(ExpectedConditions.visibilityOfElementLocated(
	 * sellerNameText));
	 * 
	 * driver.findElement(sellerNameText).sendKeys(sellerName);
	 * 
	 * }
	 */
		
		public void clickProceed() {
			// TODO Auto-generated method stub
			WebDriverWait some_element = new WebDriverWait(driver,100); 
			WebElement ele = driver.findElement(By.cssSelector("button#mlui16"));
			JavascriptExecutor executor = (JavascriptExecutor)driver;
			executor.executeScript("arguments[0].click();", ele);
			

		}
	/*
	 * public void buyerCardEnterButtonClick() {
	 * 
	 * //WebDriverWait some_element = new WebDriverWait(driver,100); WebDriverWait
	 * wait = new WebDriverWait(driver, 100);// 1 minute
	 * 
	 * 
	 * WebElement ele = driver.findElement(buyerCardEnterButton); JavascriptExecutor
	 * executor = (JavascriptExecutor)driver;
	 * executor.executeScript("arguments[0].click();", ele);
	 * wait.until(ExpectedConditions.elementToBeClickable(buyerCardEnterButton));
	 * 
	 * }
	 */
}
<file_sep>package qa.com.test.testcases;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;

import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.util.NumberToTextConverter;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

public class TestData {

	
	public ArrayList<String> dataSetUp(String testcaseName, String testCaseMode) throws IOException {
		ArrayList<String> saveDataList = new ArrayList<String>();
		FileInputStream file = new FileInputStream("C:\\Users\\Swathi\\Documents\\testdata.xlsx");
		XSSFWorkbook workbook = new XSSFWorkbook(file);
		int sheets = workbook.getNumberOfSheets();
		for (int i = 0; i < sheets; i++) {
			System.out.print(testCaseMode);
			if (workbook.getSheetName(i).equalsIgnoreCase(testCaseMode)) {

				XSSFSheet sheet = workbook.getSheetAt(i);
				Iterator<Row> rows = sheet.iterator();

				Row firstrow = rows.next();
				Iterator<Cell> ce = firstrow.cellIterator();
				int k = 0;
				int column = 0;
				while (ce.hasNext()) {
					Cell value = ce.next();

					if (value.getStringCellValue().equalsIgnoreCase("Testcase")) {

						column = k;

					}

					k++;
				}
				while (rows.hasNext()) {
					Row r = rows.next();

					if (r.getCell(column).getStringCellValue().equalsIgnoreCase(testcaseName)) {
						Iterator<Cell> cv = r.cellIterator();
						while (cv.hasNext()) {
							
							Cell c=cv.next();
							if(c.getCellTypeEnum()==CellType.STRING)
							{
											

							saveDataList.add(c.getStringCellValue());

						}
							else
							{
								
								saveDataList.add(NumberToTextConverter.toText(c.getNumericCellValue()));
								
							}
							
						}

					}

				}

			}

		}
		return saveDataList;
	}

}
<file_sep>package qa.com.pages;

import java.util.Iterator;
import java.util.Set;

import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
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 qa.com.baseclass.Baseclass;


public class LoginPage  extends Baseclass{

	WebDriverWait wait = new WebDriverWait(driver, 20);


	By email;
	By password;
	By proceedButtonClick;
	By passwordSet ;
	By FacebbookButton;
	By facebookUsername;
	By facebookPassword;
	By facebookLoginButton;
	By googleButton;
	By googleEmailId;
	By googleNextButton;
	By googlePassword;
	By googlePasswordNext;
	String parentWindowId;
	String childWindowId;

	public LoginPage() {
		
		//MANUAL LOGIN WEBELEMENTS INTIALIZATION 
		email=By.xpath("//*[@id='emailInput']");
		proceedButtonClick=By.cssSelector("button#mlui14");
		passwordSet=By.xpath("//*[@id=\"password\"]");
		
		
		//FACEBOOK LOGIN WEBELEMENTS INTIALIZATION 
		FacebbookButton=By.xpath("//*[@id='mlui10']");
		facebookUsername=By.xpath("//*[@id='email']");
		facebookPassword=By.xpath("//*[@id='pass']");
		facebookLoginButton = By.cssSelector("input#u_0_0");
		
		//GOOGLE LOGIN WEBELEMENTS INTIALIZATION 
		googleButton =By.xpath("//*[@id='mlui11']");
		googleEmailId=By.xpath("//input[@class='whsOnd zHQkBf']");
		googleNextButton=By.xpath("//*[@id='identifierNext']/span/span");
		googlePassword=By.name("<PASSWORD>");
		googlePasswordNext=By.xpath("//*[@id='passwordNext']/span/span");


	}
	
	
	// MANUAL LOGIN
	public void setEmail(String emailId) {


		WebDriverWait some_element = new WebDriverWait(driver,100); 
		some_element.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id='emailInput']"))); 

		driver.findElement(email).sendKeys(emailId);


	}			

	public void clickProceed() {


		
		WebElement ele = driver.findElement(By.cssSelector("button#mlui14"));
		JavascriptExecutor executor = (JavascriptExecutor)driver;
		executor.executeScript("arguments[0].click();", ele);


	}

	public void setPassword(String password)

	{


		WebDriverWait some_element = new WebDriverWait(driver,100); 
		some_element.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id=\"password\"]")));

		driver.findElement(passwordSet).sendKeys(password);

	}

	public void clickSignIn() {
		// TODO Auto-generated method stub

		WebElement ele = driver.findElement(By.cssSelector("button#mlui13"));
		JavascriptExecutor executor = (JavascriptExecutor)driver;
		executor.executeScript("arguments[0].click();", ele);
		

	}


	// facebook Login

	public  void facebookButtonClick()

	{
		driver.findElement(FacebbookButton).click();

		Set<String> handler = driver.getWindowHandles();
		try {
			Thread.sleep(2000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		Iterator<String> it=handler.iterator();

		parentWindowId=it.next();
		childWindowId=it.next();

		driver.switchTo().window(childWindowId);
		

	}


	public void facebookemailIdEnter(String facebookmailId)
	{
		driver.findElement(facebookUsername).sendKeys(facebookmailId);

	}

	public void facebookPasswordEnter(String facebookPass) {


		driver.findElement(facebookPassword).sendKeys(facebookPass);

	}
	public void facebookLoginButtonclick()
	{

		WebElement ele = driver.findElement(By.cssSelector("input#u_0_0"));
		JavascriptExecutor executor = (JavascriptExecutor)driver;
		executor.executeScript("arguments[0].click();", ele);
		

		driver.switchTo().window(parentWindowId);
		

	}


	
	
	//Google login 
	
	public void googleButtonClick() 
	{
	
		driver.findElement(googleButton).click();
		
		
		Set<String> handler = driver.getWindowHandles();
	

		Iterator<String> it=handler.iterator();

	    parentWindowId=it.next();
		String childWindowId=it.next();

		driver.switchTo().window(childWindowId);
		
	
   }
	

	public void googleemailIdEnter(String googleemailId)
	{
		driver.findElement(googleEmailId).sendKeys(googleemailId);

	}

	public void googlenextButtonClick() 
	{
	
		WebElement ele = driver.findElement(By.xpath("//*[@id='identifierNext']/span/span"));
		JavascriptExecutor executor = (JavascriptExecutor)driver;
		executor.executeScript("arguments[0].click();", ele);
	}
	

	
	public void googlePasswordEnter(String googlePass) {

		
		WebDriverWait some_element = new WebDriverWait(driver,100); 
		some_element.until(ExpectedConditions.visibilityOfElementLocated(By.name("password")));

		driver.findElement(googleEmailId).sendKeys(googlePass);
		//driver.findElement().sendKeys(facebookPass);

	}
	
	

	public void googlePasswordNextClick() {
		// TODO Auto-generated method stub
		WebElement ele = driver.findElement(googlePasswordNext);
		JavascriptExecutor executor = (JavascriptExecutor)driver;
		executor.executeScript("arguments[0].click();", ele);
		driver.switchTo().window(parentWindowId);
	
	}
	
	
	
	
	

}

<file_sep>package qa.com.test.testcases;

import java.io.IOException;
import java.util.ArrayList;

import org.testng.annotations.Test;

import qa.com.baseclass.Baseclass;
import qa.com.test.scenarios.LoginScenario;
import qa.com.test.scenarios.OnboardingScenario;

public class SellerOnboardingTestcase  extends Baseclass{

	
	
	@Test
	
	public static void sellerOnboardingUsingDataBaseskill() throws InterruptedException, IOException {

		
	    LoginTestcase.LoginManualEmailPasswordOnboard();
	    Thread.sleep(10000);
		TestData testData = new TestData();
		ArrayList<String> getOnboardDataList = testData.dataSetUp("SellerOnboardingUsingDatabaseSkill","SellerOnboarding");

		String sellerName = getOnboardDataList.get(1);
		String skill = getOnboardDataList.get(2);
		String yearOfExperience = getOnboardDataList.get(3);
		OnboardingScenario pageObjOnboard = new OnboardingScenario();
		 pageObjOnboard.sellerOnboarding(sellerName , skill, yearOfExperience);
		

		
		/*
		 * String sellerName = "swathi"; String skill = "java";
		 * LoginTestcase.LoginManualEmailPasswordOnboard(); Thread.sleep(10000);
		 * 
		 * OnboardingScenario pageObjOnboard = new OnboardingScenario();
		 * pageObjOnboard.sellerOnboarding(sellerName , skill);
		 */

	}
}
<file_sep>package qa.com.pages;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.Statement;
import java.util.Iterator;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

import qa.com.baseclass.Baseclass;

import java.sql.ResultSet;
import java.sql.SQLException;

public class RegistrationPage extends Baseclass {

	WebDriverWait wait = new WebDriverWait(driver, 300);

	By email;
	By createAccount;
	By proceedButtonClick;
	By setPassword;
	By FacebbookButton;
	By facebookUsername;
	By facebookPassword;
	By facebookLoginButton;
	By googleButton;
	By googleEmailId;
	By googleNextButton;
	By googlePassword;
	By googlePaswordNext;
	By registerOkPopup;
	By createPasswordButton;
	String parentWindowId;
	String childWindowId;

	// manual registration

	public RegistrationPage() {

		email = By.xpath("//*[@id='emailInput']");
		createAccount=By.cssSelector("button#mlui12");
		setPassword = By.cssSelector("input#password-<PASSWORD>");
		setPassword = By.xpath("//*[@id='<PASSWORD>']");
		createPasswordButton = By.xpath("//button[contains(text(),'PROCEED')]");

		registerOkPopup = By.xpath("//button[@class='swal2-confirm swal2-styled']");

		FacebbookButton = By.xpath("//*[@id='mlui10']");
		facebookUsername = By.xpath("//*[@id='email']");
		facebookPassword = By.xpath("//*[@id='pass']");

		googleButton = By.xpath("//*[@id='mlui11']");
		googleEmailId = By.xpath("//input[@class='whsOnd zHQkBf']");
		googleNextButton = By.xpath("//*[@id='identifierNext']/span/span");
		googlePassword = By.name("<PASSWORD>");
		googlePaswordNext = By.xpath("//*[@id='passwordNext']/span/span");
//		registerOkPopup=By.xpath("//button[contains(text(),'OK')]");

	}

	public void setEmail(String emailId) {

		WebDriverWait some_element = new WebDriverWait(driver, 100);
		some_element.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id='emailInput']")));

		driver.findElement(email).sendKeys(emailId);

	}

	public void clickcreateAccount(String email) throws SQLException, InterruptedException {

		WebElement ele = driver.findElement(createAccount);
		JavascriptExecutor executor = (JavascriptExecutor) driver;
		executor.executeScript("arguments[0].click();", ele);
		Thread.sleep(6000);

		Statement s = con.createStatement();
//		ResultSet rs = s
//				.executeQuery("SELECT email_verifications.verification_key FROM aspirants JOIN email_verifications\r\n"
//						+ "   ON aspirants.aspirant_id = email_verifications.aspirant_id where aspirants.email_address=\"<EMAIL>\" ;");
//		
		String key = null;
		String query= "SELECT email_verifications.verification_key FROM aspirants JOIN email_verifications ON aspirants.aspirant_id = email_verifications.aspirant_id where aspirants.email_address = ? ";
		PreparedStatement ps = con.prepareStatement(query);
		ps.setString(1,email);
		ResultSet rs =ps.executeQuery();
		while (rs.next()) {
		 key = rs.getString("verification_key");
		}
	
		// String key = UUID.randomUUID().toString().replaceAll("-", "");

		driver.get("https://www.qa.moonlyte.com/accounts/login-change-password/" + key);
		   
		
	}

	/*
	 * public void clickRegisterOkPopoup() throws SQLException {
	 * 
	 * 
	 * driver.navigate().refresh(); WebElement ele =
	 * driver.findElement(registerOkPopup); JavascriptExecutor executor =
	 * (JavascriptExecutor) driver; executor.executeScript("arguments[0].click();",
	 * ele);
	 * 
	 * 
	 * 
	 * Statement s = con.createStatement(); ResultSet rs = s.
	 * executeQuery("SELECT email_verifications.verification_key FROM aspirants JOIN email_verifications\r\n"
	 * +
	 * "   ON aspirants.aspirant_id = email_verifications.aspirant_id where aspirants.email_address=\"<EMAIL>\" ;"
	 * ); String key = null; while (rs.next()) { key =
	 * rs.getString("verification_key"); }
	 * 
	 * // String key = UUID.randomUUID().toString().replaceAll("-", "");
	 * 
	 * driver.get("https://www.qa.moonlyte.com/accounts/login-change-password/" +
	 * key);
	 * 
	 * 
	 * 
	 * }
	 */

	public void createPassword(String password) throws InterruptedException

	{
		
		WebDriverWait some_element = new WebDriverWait(driver, 100);
		some_element.until(ExpectedConditions.visibilityOfElementLocated(setPassword));

		driver.findElement(setPassword).sendKeys(<PASSWORD>);
		
	}

	public void createPasswordProceedButtonClick() throws InterruptedException {

		WebElement ele = driver.findElement(createPasswordButton);
		JavascriptExecutor executor = (JavascriptExecutor) driver;
		executor.executeScript("arguments[0].click();", ele);
		Thread.sleep(2000);

	}

	// facebookregistration

	public  void facebookButtonClick()

	{
		driver.findElement(FacebbookButton).click();

		Set<String> handler = driver.getWindowHandles();

		Iterator<String> it = handler.iterator();

		String parentWindowId = it.next();
		String childWindowId = it.next();

		driver.switchTo().window(childWindowId);

	}

	public void facebookemailIdEnter(String facebookmailId) {
		driver.findElement(facebookUsername).sendKeys(facebookmailId);

	}

	public void facebookPasswordEnter(String facebookPass) {

		driver.findElement(facebookPassword).sendKeys(facebookPass);

	}

	public void facebookLoginButtonclick() {

		WebElement ele = driver.findElement(By.cssSelector("input#u_0_0"));
		JavascriptExecutor executor = (JavascriptExecutor) driver;
		executor.executeScript("arguments[0].click();", ele);

		// driver.switchTo().window(parentWindowId);

	}

	// GoogleRegistration

	public  void googleButtonClick() {

		driver.findElement(googleButton).click();

		Set<String> handler = driver.getWindowHandles();
		try {
			Thread.sleep(5000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		Iterator<String> it = handler.iterator();

	    parentWindowId = it.next();
		String childWindowId = it.next();

		driver.switchTo().window(childWindowId);

	}

	public void googleemailIdEnter(String googleemailId) {
		driver.findElement(googleEmailId).sendKeys(googleemailId);

	}

	public void googlenextButtonClick() {

		WebElement ele = driver.findElement(googleNextButton);
		JavascriptExecutor executor = (JavascriptExecutor) driver;
		executor.executeScript("arguments[0].click();", ele);

	}

	public void googlePasswordEnter(String googlePass) {

		WebDriverWait some_element = new WebDriverWait(driver, 100);
		some_element.until(ExpectedConditions.visibilityOfElementLocated(By.name("password")));

		driver.findElement(googleEmailId).sendKeys(googlePass);
		//driver.findElement().sendKeys(facebookPass);

	}

	public void googlePasswordNextClick() throws InterruptedException

	{

		WebElement ele = driver.findElement(googlePaswordNext);
		JavascriptExecutor executor = (JavascriptExecutor) driver;
		executor.executeScript("arguments[0].click();", ele);
		

		driver.switchTo().window(parentWindowId);
		System.out.println("Switched to parent" );

	}
}<file_sep>package qa.com.test.testcases;

import java.io.IOException;
import java.util.ArrayList;

import org.testng.annotations.Test;

import qa.com.baseclass.Baseclass;
import qa.com.test.scenarios.BuyerRegistrationScenario;
import qa.com.test.scenarios.CreateDemandScenarios;

public class CreateDemand extends Baseclass   {

	@Test
	public static void createProjectwithoutChallenge() throws InterruptedException, IOException {

		
	   BuyerRegistrationTestcase.buyerRegistrationNonasIndividual();
	    Thread.sleep(10000);

		TestData testData = new TestData();
		ArrayList<String> getCreateDemandList = testData.dataSetUp("CreateDemandwithoutChallenge", "CreateDemand ");

		String projectTitle = getCreateDemandList.get(1);
		String compensation = getCreateDemandList.get(2);
		String descriprion = getCreateDemandList.get(3);
		String yearOfExp = getCreateDemandList.get(4);
		String skill = getCreateDemandList.get(5);
		
	
		CreateDemandScenarios  project=new CreateDemandScenarios();
	        project.createDemand(projectTitle, compensation, descriprion, yearOfExp, skill);
	/*
	 * String companyName = "akarsh technology"; String sellerName = "swathi";
	 * LoginTestcase.LoginManualEmailPasswordOnboard(); Thread.sleep(5000);
	 * 
	 * 
	 * 
	 * 
	 * 
	 * BuyerRegistrationScenario buyerRegObj=new BuyerRegistrationScenario();
	 * buyerRegObj.buyerRegistrationNonasanIndividual(companyName, sellerName);
	 */

}
	
	
	
}
<file_sep>package qa.com.test.testcases;

import java.io.IOException;
import java.util.ArrayList;

import org.testng.annotations.Test;

import qa.com.baseclass.Baseclass;
import qa.com.test.scenarios.BuyerRegistrationScenario;
import qa.com.test.scenarios.OnboardingScenario;

public class BuyerRegistrationTestcase extends Baseclass{

	
	
	
	@Test
	public static void buyerRegistrationNonasIndividual() throws InterruptedException, IOException {

		
		    LoginTestcase.EmailFacebookLogin();
		    Thread.sleep(10000);
			TestData testData = new TestData();
			ArrayList<String> getBuyerRegisterData = testData.dataSetUp("BuyerRegistrationNonasanIndividual","BuyerRegistration");

			String companyName = getBuyerRegisterData.get(3);
			String sellerName = getBuyerRegisterData.get(4);
			
		
			 BuyerRegistrationScenario buyerRegObj=new BuyerRegistrationScenario();
		        buyerRegObj.buyerRegistration(companyName, sellerName);
				
		
		/*
		 * String companyName = "akarsh technology"; String sellerName = "swathi";
		 * LoginTestcase.LoginManualEmailPasswordOnboard(); Thread.sleep(5000);
		 * 
		 * 
		 * 
		 * 
		 * 
		 * BuyerRegistrationScenario buyerRegObj=new BuyerRegistrationScenario();
		 * buyerRegObj.buyerRegistrationNonasanIndividual(companyName, sellerName);
		 */

	}
	
	
	
}
<file_sep>package qa.com.pages;

import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

import qa.com.baseclass.Baseclass;

public class CreateDemandPage extends Baseclass{
	WebDriverWait wait = new WebDriverWait(driver, 20);	

	By hambugerCreateProject;
	By projectTitletext;
	By projectCompensation;
	By  projectDescription;
	
					
			
	
	public CreateDemandPage()
	{


	
		hambugerCreateProject=By.xpath("//span[contains(text(),'New Projects')]");
        
		projectTitletext=By.cssSelector("input.form-control ng-pristine ng-invalid ng-touched");
		
		
		
	}

	
	public void hamburgerCreateProjectClick()
	{

		WebElement ele = driver.findElement(hambugerCreateProject);
		JavascriptExecutor executor = (JavascriptExecutor)driver;
		executor.executeScript("arguments[0].click();", ele);
		
		
	}
	
	public void getProjectTitle(String projectTitle) throws InterruptedException
	{
	

		driver.findElement(projectTitletext).sendKeys(projectTitle);
	Thread.sleep(3000);
		
	}
	
	
	
	
	}
	
	
	
	
	
	
	

<file_sep>package qa.com.test.testcases;

import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;

import org.testng.annotations.Test;

import qa.com.baseclass.Baseclass;
import qa.com.test.scenarios.LoginScenario;
import qa.com.test.scenarios.RegisterScenario;

public class RegisterTestcase extends Baseclass {


	//MANUAL REGISTER TESTCASE	
	
	
@Test
	public static void RegisterManualEmailPasswordcorrect() throws InterruptedException, SQLException, IOException {

		TestData testData = new TestData();
		ArrayList<String> getManualDataList = testData.dataSetUp("ManualRegistrationCredentials","Registration");

		String email = getManualDataList.get(1);
		String pass = getManualDataList.get(2);
		RegisterScenario pageObjReg = new RegisterScenario();
		pageObjReg.manualRegister(email, pass);

		
		
		
		/*
		 * String email = "<EMAIL>"; String pass = "<PASSWORD>";
		 */
		

	}


	
	//FACEBOOK REGISTER TESTCASE
	
	@Test
	public static void EmailFacebookRegister() throws IOException, InterruptedException {
		  TestData testData = new TestData();
			ArrayList<String> getFacebookDataList = testData.dataSetUp("FacebookRegistrationCredentials","Registration");

		String facebookmailId =  getFacebookDataList.get(1);
		String facebookPassword=getFacebookDataList.get(2);
		RegisterScenario fbReg = new RegisterScenario();
		fbReg.facebookRegister(facebookmailId, facebookPassword);
	
		
	}
   
   	//GOOGLEREGISTER TESTCASE
   
	
 @Test
	public static void GoogleRegisterTestcase() throws IOException, InterruptedException
	{

		  TestData testData = new TestData();
	     ArrayList<String> getGoogleDataList = testData.dataSetUp("GoogleRegistrationCredentials","Registration");

		String googlemailId =  getGoogleDataList.get(1);
		String googlePassword=getGoogleDataList.get(2);
		RegisterScenario googleRegObj=new RegisterScenario();
		googleRegObj.googleRegister(googlemailId,googlePassword);


	}












}
<file_sep>package qa.com.pages;

import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

import qa.com.baseclass.Baseclass;

public class OnboardingPage extends Baseclass {
	
	WebDriverWait wait = new WebDriverWait(driver, 20);
	By name;
	By proceedButton;
	By skillSelection;
	By proceedButton1;
	By yearOfExperiencetext;
	By proceedButton2;
	By OnboardSucess;
	By onboardComplete;

	
	
	public OnboardingPage()
	{


		name=By.xpath("//input[@type='text']");
		proceedButton=By.xpath("//button[contains(text(),'PROCEED')]");
		//skillSelection=By.xpath("//*[@id='onboard-add-skills']/div[1]/mat-form-field/div/div[1]/div");
		skillSelection=By.id("mat-chip-list-input-2");
		 proceedButton1=By.xpath("//button[@class='btn btn-primary btn-ml pulse']");
		 yearOfExperiencetext=By.cssSelector("input[type='number'");
			proceedButton2=By.xpath("//button[contains(text(),'PROCEED')]");
			OnboardSucess=By.xpath("//button[contains(text(),' YES')]");
			onboardComplete=By.xpath("//button[contains(text(),'PROCEED')]");
			
			
	}
	
	public void setName(String sellerName) {


		//WebDriverWait some_element = new WebDriverWait(driver,200); 
		
		//wait.until(ExpectedConditions.visibilityOfElementLocated(name));
		driver.findElement(name).clear();
		
		driver.findElement(name).sendKeys(sellerName);
	
	
		//driver.findElement(name).sendKeys(sellerName + Keys.ARROW_DOWN.ENTER);


	}	
	
public void clickOnboardProceed1()  {


	
		WebElement ele = driver.findElement(proceedButton);
		JavascriptExecutor executor = (JavascriptExecutor)driver;
		executor.executeScript("arguments[0].click();", ele);
		
		//wait.until(ExpectedConditions.visibilityOfElementLocated(skillSelection));

	}
	
public  void selectSkill(String skill) throws InterruptedException {
	
    driver.findElement(skillSelection).sendKeys(skill);
    Thread.sleep(2000);
    driver.findElement(skillSelection).sendKeys(Keys.ARROW_DOWN);
    Thread.sleep(2000);
	driver.findElement(skillSelection).sendKeys(Keys.ENTER);

    
	//driver.findElement(skillSelection).sendKeys(skill+ Keys.ARROW_DOWN.ENTER);

}

public void clickOnboardProceed2()  {


	
	WebElement ele = driver.findElement(proceedButton1);
	JavascriptExecutor executor = (JavascriptExecutor)driver;
	executor.executeScript("arguments[0].click();", ele);
	

}
public void getYearOfExperience(String yearOfExperience) {
	
	 driver.findElement(yearOfExperiencetext).sendKeys(yearOfExperience);

}
public void clickOnboardProceed3()  {


	
	WebElement ele = driver.findElement(proceedButton2);
	JavascriptExecutor executor = (JavascriptExecutor)driver;
	executor.executeScript("arguments[0].click();", ele);
	

}


public void onboardSucessClick()  {


	
	WebElement ele = driver.findElement(OnboardSucess);
	JavascriptExecutor executor = (JavascriptExecutor)driver;
	executor.executeScript("arguments[0].click();", ele);
	

}
public void clickOnboardComplete()  {


	
	WebElement ele = driver.findElement(onboardComplete);
	JavascriptExecutor executor = (JavascriptExecutor)driver;
	executor.executeScript("arguments[0].click();", ele);
	

}

}<file_sep>package qa.com.test.scenarios;

import qa.com.baseclass.Baseclass;
import qa.com.pages.LaunchPage;
import qa.com.pages.LoginPage;

public class LoginScenario extends Baseclass {

	LoginPage moonlyteloginPage = new LoginPage();
	LaunchPage pageObjLogin = new LaunchPage();

//MANUAL LOGIN SCENARIOS
	public void manualLogin(String email, String pass) throws InterruptedException {


		pageObjLogin.signInButtonClick();
		Thread.sleep(3000);
		moonlyteloginPage.setEmail(email);
		Thread.sleep(3000);
		moonlyteloginPage.clickProceed();
		Thread.sleep(3000);
		moonlyteloginPage.setPassword(pass);
		Thread.sleep(3000);
		moonlyteloginPage.clickSignIn();

	}
	
	// FACEBOOK LOGIN SCENARIOS
	
	public void facebookLogin(String facebookmailId , String facebookPassword ) throws InterruptedException {
		// TODO Auto-generated method stub

		pageObjLogin.signInButtonClick();
		Thread.sleep(3000);
		moonlyteloginPage.facebookButtonClick();
		Thread.sleep(3000);
		moonlyteloginPage.facebookemailIdEnter(facebookmailId);
		Thread.sleep(3000);
		moonlyteloginPage.facebookPasswordEnter(facebookPassword);
		Thread.sleep(3000);
		moonlyteloginPage.facebookLoginButtonclick();
		
	}

	
	
	//GOOGLE LOGIN SCENARIOS
    public void googleLogin(String googlemailId ,String googlePassword ) throws InterruptedException
 
{

	pageObjLogin.signInButtonClick();
	Thread.sleep(3000);
	moonlyteloginPage.googleButtonClick();
	Thread.sleep(3000);
	moonlyteloginPage.googleemailIdEnter(googlemailId );
	Thread.sleep(3000);
	moonlyteloginPage.googlenextButtonClick();
	Thread.sleep(3000);
	moonlyteloginPage.googlePasswordEnter(googlePassword);
	Thread.sleep(3000);
	moonlyteloginPage.googlePasswordNextClick();
	
	
		
	
}




	
	



	
	}
<file_sep>package qa.com.test.scenarios;

import org.testng.annotations.Test;

import qa.com.pages.BuyerRegistrationPage;
import qa.com.pages.CreateDemandPage;

public class CreateDemandScenarios {

	
	CreateDemandPage demand =new CreateDemandPage();
	
	
	
	
	public void createDemand(String projectTitle, String compensation, String descriprion, String yearOfExp, String skillString ) throws InterruptedException
	{
		// TODO Auto-generated method stub
		{
		
	
	demand.hamburgerCreateProjectClick();
	Thread.sleep(2000);
    demand.getProjectTitle(projectTitle);
    Thread.sleep(1000);
		
	}
	
	
	}
}
