Professional Documents
Culture Documents
Interview Program
Interview Program
Interview Program
import java.time.Duration;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.testng.Assert;
import org.testng.annotations.Test;
import io.github.bonigarcia.wdm.WebDriverManager;
@Test
public void getTitle() throws InterruptedException
{
WebDriverManager.chromedriver().setup();
options.addArguments("--remote-allow-origins=*");
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(5));
driver.get("https://returns-cpa.safesendreturns.com/");
driver.manage().window().maximize();
//Thread.sleep(2000);
WebElement email =
driver.findElement(By.id("txtUsername"));
email.sendKeys("test170423@yopmail.com");
WebElement password =
driver.findElement(By.id("txtPassword"));
password.sendKeys("Test@1234");
WebElement loginButton =
driver.findElement(By.id("btnLogin"));
loginButton.click();
Assert.assertEquals(actualTitle, expectedTitle,"Title is
not matching");
driver.quit();