title: (Should be easy) Selenium chromedriver (java) no element found error
body: <p>I tried this exact code on other websites and it seems to work fine. It's just on pizza hut that it can't even locate an element let alone click on it. Thread.sleep() doesn't make a difference. The problem is between the commented *, according to the compiler. Here's the code.</p>
  
  <pre><code>package training;
  
  import org.junit.Test;
  import org.openqa.selenium.By;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.chrome.ChromeDriver;
  
  public class PizzaHut {
  
  WebDriver driver;
  @Test
  public void open() throws Exception {
          //SET UP WEBDRIVER AND OPEN WEBSITE
          System.setProperty("webdriver.chrome.driver","/Users/1mr4n/Downloads/chromedriver");
          WebDriver driver = new ChromeDriver();
          driver.get("https://www.pizzahut.com/#/home");
          Thread.sleep(1000);
  
          //CLICK PIZZA
          Thread.sleep(5000);
          test("before");
          //**************PROBLEM*CODE**********************
          driver.findElement(By.xpath("//a[@id='lg-nav-pizza']")).click();
          //************************************************
          test("clicked pizza");
  
          //CLOSE BROWSER
          Thread.sleep(15000);
          driver.close();
      }
  
      public static void test(String x) {
          System.out.println(x);
      }
  }
  </code></pre>