package Others;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.Test;
public class testsample
{
@Test
public void Navigate_forward_back() throws InterruptedException
{
//1. Open the Chrome Browser
System.setProperty("webdriver.chrome.driver", "D:\\Softwares\\chromedriver_win32\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
//Open the URL
driver.get("http://www.google.com");
//navigate on specific software web application page or URL
driver.navigate().to("http://selenium-venkat.blogspot.com/p/index_4.html");
//To navigate back (Same as clicking on browser back button)
driver.navigate().back();
//To navigate forward (Same as clicking on browser forward button)
driver.navigate().forward();
}
}
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.Test;
public class testsample
{
@Test
public void Navigate_forward_back() throws InterruptedException
{
//1. Open the Chrome Browser
System.setProperty("webdriver.chrome.driver", "D:\\Softwares\\chromedriver_win32\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
//Open the URL
driver.get("http://www.google.com");
//navigate on specific software web application page or URL
driver.navigate().to("http://selenium-venkat.blogspot.com/p/index_4.html");
//To navigate back (Same as clicking on browser back button)
driver.navigate().back();
//To navigate forward (Same as clicking on browser forward button)
driver.navigate().forward();
}
}
No comments:
Post a Comment