Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created August 20, 2020 10:26
Show Gist options
  • Save angelovstanton/36e7d08f5e2a7e2912f27a99b21c0e9f to your computer and use it in GitHub Desktop.
Save angelovstanton/36e7d08f5e2a7e2912f27a99b21c0e9f to your computer and use it in GitHub Desktop.
@Test
public void navigationHistory() {
driver.navigate().to("https://www.codeproject.com/Articles/1078541/Advanced-WebDriver-Tips-and-Tricks-Part");
driver.navigate().to("http://www.codeproject.com/Articles/1017816/Speed-up-Selenium-Tests-through-RAM-Facts-and-Myth");
driver.navigate().back();
Assert.assertEquals("10 Advanced WebDriver Tips and Tricks - Part 1 - CodeProject", driver.getTitle());
driver.navigate().refresh();
Assert.assertEquals("10 Advanced WebDriver Tips and Tricks - Part 1 - CodeProject", driver.getTitle());
driver.navigate().forward();
Assert.assertEquals("Speed up Selenium Tests through RAM Facts and Myths - CodeProject", driver.getTitle());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment