title: selenium webdriver url after login
body: <p>I got this selenium test code.
  Its able to load a url, login my user name and password. but problem is, after login, i can't get current url</p>
  <p>I want to get current url so  ican test and assert if i have really logged</p>
  <pre><code>    WebDriver driver = new ChromeDriver();
      driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
      driver.get(&quot;http://testingapp.workspez.com&quot;);
      driver.manage().window().maximize();
  
      WebElement username = driver.findElement(By.id(&quot;field_email&quot;));
      WebElement password = driver.findElement(By.id(&quot;field_password&quot;));
      WebElement login = driver.findElement(By.xpath(&quot;//*[text()='Log In']&quot;));
      
      username.sendKeys(&quot;rahul@workspez.com&quot;);
      password.sendKeys(&quot;Sujeet@19&quot;);
      login.click();
      driver.manage().timeouts().implicitlyWait(120, TimeUnit.SECONDS);
      String url = driver.getCurrentUrl();
      System.out.println(&quot;url:&quot;+driver.getTitle());
      System.out.println(&quot;url:&quot;+driver.getCurrentUrl());
  </code></pre>