package com.trackingio.logonPage;



import java.util.concurrent.TimeUnit;

import com.trackingio.util.CfReader;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.Test;

public class Logon extends PageObject_login{

	WebDriver driver;

	@Test
	public void LogonTKIO(String uname,String pwd) {

		driver = CfReader.getWebDriver();
		driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
		driver.manage().window().maximize();
		driver.get(CfReader.baseURl);

		PageObject_login loginPage = PageFactory.initElements(driver,PageObject_login.class);

		new WebDriverWait(driver,5)
				.until(ExpectedConditions.visibilityOf(loginPage.trackingIOLogo));

		loginPage.accountEmail_input.clear();
		loginPage.accountEmail_input.sendKeys(uname);

		loginPage.accountPwd_input.clear();
		loginPage.accountPwd_input.sendKeys(pwd);

	}
	
	
	

}
