Q:

Selenium Web Driver seems to skip driver.get() intermittently

I have a Selenium Web Driver test written in Java, targeting a Liferay site.
// Login
driver.get(baseUrl + "/");
driver.findElement(By.id("_58_login")).sendKeys(login);
driver.findElement(By.id("_58_password")).sendKeys(password);
driver.findElement(By.xpath("//input[@value='Sign In']")).click();

// Try to navigate to dashboard and expect error
WebDriverWait wait = new WebDriverWait(driver, 30);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.linkText("Liferay")));
driver.get(baseUrl + "/user/tm2/so/dashboard");
driver.findElement(By.xpath("//h3[contains(., 'Not Found')]"));

The problem is that intermittently (~50% of the time), the test fails with exception org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"xpath","selector":"//h3[contains(., 'Not Found')]"}
When watching the Web Driver's browser behavior during the test, what happens is that the login routine works as expected, clicking the "Sign In" button. But then once the page reaches the landing page, it hangs for 30 seconds (my implicit timeout setting), and throws the exception.
My suspicion is that the driver.get(baseUrl + "/user/tm2/so/dashboard") call is somehow skipped over. You can see I have setup a WebDriverWait to try to prevent the driver.get navigation from happening until the login routine is finished, but it doesn't seem to help.
Any ideas?
UPDATE: I found out the problem is not Selenium related - it's a problem in the application itself where sometimes navigating to URLs just refreshes the current page.

A:

No problem, change code to something like this instead:
Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)
           .withTimeout(30, SECONDS)
           .pollingEvery(5, SECONDS)
           .ignoring(NoSuchElementException.class, ElementNotFoundException.class);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.linkText("Liferay")));
driver.get(baseUrl + "/user/tm2/so/dashboard");
driver.findElement(By.xpath("//h3[contains(., 'Not Found')]"));

