java compile error using driver.navigate

Hi ,  my tests compile for everthing (Browser commands, Web Element etc.) but for navigation


// Click on About link


// Go back to Home Page


driver,navigate().back()  gives compile error :

“the type org.openqa.selenium.WEbDriver$Navigation cannot be resolved. It is indirectly referenced from required class file”

Am I missing some extra import ?

THanks, Adrian

aosulliv Default Asked on July 30, 2015 in Selenium WebDriver.
Add Comment
1 Answer(s)
public static void main(String args[])
WebDriver driver = new FirefoxDriver();
// Click on About link
// Go back to Home Page

The above code is working fine for me , I am using Jre 8 with Selenium-server-Standalone-2.47.1 Jar

Please make sure the time outs and page load time outs are handled correctly .  The above code was tested in Debug mode

Bheem Reddy Supporter Answered on August 9, 2015.

HI, thanks for answer. When I code :

WebDriver driver = new FirefoxDriver();

the line
won’t compile

error message  it gives :
“The method findelement(By) is undefined for type WebDriver”

So I use
FirefoxDriver driver = new FirefoxDRiver();

THis will compile OK but then I have  driver.navigate issue

Complete code is here :

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.firefox.FirefoxDriver;


import org.openqa.selenium.By;//import needed for findElement(By ..)

public class NavigateBack {

public static WebDriver driver;

public static void main(String[] args) {

System.setProperty(“”, “c:\\development\\selenium\\drivers\\IEDriverServer.exe”);

FirefoxDriver fdriver = new FirefoxDriver();

fdriver.get(“”);//OK , runs

fdriver.findElement(By.linkText(“Download”)).click();// code from example

try {


} catch (InterruptedException e) {

// TODO Auto-generated catch block



finally {



fdriver.navigate().back();//compile can’t be resolved , is indirectly ref’ed from req .class file




I use jre 8 and Selenium-server-Standalone-2.45.0 Jar

on August 11, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.