package creditfair_website_uipages;

import java.io.File;
import java.nio.file.Paths;
import java.util.concurrent.TimeUnit;

import org.apache.xmlbeans.impl.store.Path;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

public class WebsiteFourForm {

	public void addFourpage (WebDriver driver,WebElement panfileupload,WebElement addharfileupload, WebElement addharbackfileupload, WebElement applybutton) throws InterruptedException
	{
		Thread.sleep(5000);
try {
	
	    File uploadFile = new File(System.getProperty("user.dir")+"/asset/orange3.png");
	    String imagePath = uploadFile.getAbsolutePath();
		panfileupload.sendKeys(imagePath);
		driver.manage().timeouts().implicitlyWait(6000, TimeUnit.SECONDS);
        addharfileupload.sendKeys(imagePath);
   	    driver.manage().timeouts().implicitlyWait(6000, TimeUnit.SECONDS);
		addharbackfileupload.sendKeys(imagePath);
		driver.manage().timeouts().implicitlyWait(6000, TimeUnit.SECONDS);
		applybutton.click();
		
	}
catch(Exception e)
{
	System.out.println(e);
}
	}
}
