package com.ubique.test;

import org.openqa.selenium.By;
import org.openqa.selenium.support.PageFactory;
import org.testng.annotations.Test;

import com.ubique.core.SelTestCase;
import com.ubique.dataobject.ResistrationData;
import com.ubique.pageobject.NewRegistrationPage;

public class WebDriverTest extends SelTestCase{
	
		
	/**
	 * Data driven testing using csv file
	 * 
	 * @param registrationData
	 */
	@Test(dataProvider = "regCSVData", dataProviderClass = ResistrationData.class)
	public void newRegistrationUsingCSVFile(ResistrationData registrationData) {
		driver.get(appURL);
		NewRegistrationPage registration = PageFactory.initElements(driver,
				NewRegistrationPage.class);
		registration.registerNewUser(registrationData);
		assert driver
				.findElement(By.tagName("body"))
				.getText()
				.contains(
						"Thank you for registering. "
								+ "You may now sign-in using the user name and password you've just entered.");
	}

}
