import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Testscript01 {
static WebDriver d;
public static void setup() {
System.setProperty("webdriver.chrome.driver", "C:\\Users\\Shaikshavali Shaik\\chromedriver.exe");
// System.setProperty("webdriver.gecko.driver", "C:\\Users\\Shaikshavali
// Shaik\\Downloads\\geckodriver-v0.26.0-win64\\geckodriver.exe");
WebDriver d = new ChromeDriver();
d.manage().timeouts().implicitlyWait(Util.WAIT_TIME, TimeUnit.SECONDS);
d.get(Util.BASE_URL);
}
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
setup();
d.findElement(By.xpath("//input[@name='uid']")).clear();
d.findElement(By.xpath("//input[@name='uid']")).sendKeys(Util.USER_NAME);
d.findElement(By.cssSelector("input[name='password']")).clear();
d.findElement(By.cssSelector("input[name='password']")).sendKeys(Util.PASSWRD);
d.findElement(By.name("btnLogin")).click();
String ACTUAL_TILLE = d.getTitle();
if(ACTUAL_TILLE.contains(Util.EXPCTED_TITLE))
{
System.out.println("Test Case : Passed");
}
else
{
System.out.println("Test Case : Failed");
}
}
}