import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Front_back_button {
public static void main(String[] args) throws InterruptedException {
WebDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS);
driver.navigate().to("http://www.gmail.com");
driver.findElement(By.xpath("//*[@id='gmail-create-account']")).click();
//Thread.sleep(50000L);
//driver.navigate().back();
//Thread.sleep(5000L);
//driver.navigate().forward();
//Thread.sleep(5000L);
//driver.quit();
}
}