So we can open all the popular browsers, now we need to go the websites we are trying to automate.
WebDriver provides us with all the common navigation methods we associate with browsers.
We can find them on the navigate class, Driver.navigate().
This is used to navigate to a website, pass in the URL you want to navigate to.
driver.navigate().to("http://google.com");
I rarely use this, but it will act as if you’ve pressed back on the browser.
driver.navigate().back();
I rarely use this, but it will act as if you’ve pressed forward on the browser.
driver.navigate().forward();
I rarely use this, but it will act as if you’ve pressed refresh on the browser.
driver.navigate().refresh();
Comments