Browser navigation

There are commands for various webpage loading actions:


// Navigate to a URL (both of the statements below are
// functionally equivalent).
driver.get("https://www.google.com");
driver.navigate().to("https://www.google.com");

// Go forward one page in the browser (if you're not on the
// last page that was viewed).
driver.navigate().forward();

// Go back one page in the browser (if you're not on the
// first page that was viewed).
driver.navigate().back();

// Refresh the current page.
driver.navigate().refresh();
  

# Navigate to a URL.
driver.get('https://www.google.com')

# Go forward one page in the browser (if you're not on the
# last page that was viewed).
driver.forward()

# Go back one page in the browser (if you're not on the
# first page that was viewed).
driver.back()

# Refresh the current page.
driver.refresh()
  

// Navigate to a URL
driver.Navigate().GoToUrl("http://www.google.com");

// Go forward one page in the browser (if you're not on the
// last page that was viewed).
driver.Navigate().Forward();

// Go back one page in the browser (if you're not on the
// first page that was viewed).
driver.Navigate().Back();
            
// Refresh the current page.
driver.Navigate().Refresh();
  

# Navigate to a URL (both of the statements below are
# functionally equivalent).
driver.get('https://www.google.com')
driver.navigate.to('https://www.google.com')

# Go forward one page in the browser (if you're not on the
# last page that was viewed).
driver.navigate.forward

# Go back one page in the browser (if you're not on the
# first page that was viewed).
driver.navigate.back

# Refresh the current page.
driver.navigate.refresh
  

# Navigate to a URL (both of the statements below are
# functionally equivalent).
driver.get("https://www.google.com");
driver.navigate().to("https://www.google.com");

# Go forward one page in the browser (if you're not on the
# last page that was viewed).
driver.navigate().forward();

# Go back one page in the browser (if you're not on the
# first page that was viewed).
driver.navigate().back();

# Refresh the current page.
driver.navigate().refresh();
  

// Navigate to a URL (both of the statements below are
// functionally equivalent).
driver.get("https://www.google.com")
driver.navigate().to("https://www.google.com")

// Go forward one page in the browser (if you're not on the
// last page that was viewed).
driver.navigate().forward()

// Go back one page in the browser (if you're not on the
// first page that was viewed).
driver.navigate().back()

// Refresh the current page.
driver.navigate().refresh()