import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
public class testing {
public static void main(String[] args) throws InterruptedException {
WebDriver driver = new FirefoxDriver();
driver.get(baseUrl);
driver.findElement(By.id("identifierId")).sendKeys("**********@
gmail.com");
driver.findElement(By.id("identifierNext")).click();
Thread.sleep(3000);
driver.findElement(By.xpath(".//*[@id='password']/div[1]/div/div[1]/input")).sendKeys("*****");
driver.findElement(By.id("passwordNext")).click();
Thread.sleep(4000);
driver.findElement(By.xpath("//*[@id=':2t']/div[2]")).click();
Thread.sleep(3000);
// to click the unread mail in the dropdown
WebElement value=driver.findElement(By.xpath("//div[7]/div/div[4]/div"));
Actions act=new Actions(driver);
act.moveToElement(value).build().perform();
value.click();
Thread.sleep(2000);
//driver.close();
//System.exit(0);
}
}