import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.Assert;
import org.testng.annotations.Test;
public class Sample { @Test public void testupLogin() { System.setProperty(“webdriver.chrome.driver”, “path of driver”);
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get(“https://testup.io/login”);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.findElement(By.id(“loginUsername”)).sendKeys(“xxxxxx@abc.com”);
driver.findElement(By.name(“password”)).sendKeys(“xxxxxxx”);
driver.findElement(By.xpath(“//button[text()=’SIGN IN’]”)).click();
String actualURL = “https://testup.io”;
String expectedURL = driver.getCurrentUrl();
Assert.assertEquals(expectedURL, actualURL);
driver.close();
} }