title: Selenium :After launching a website how could we check if the right page is launched
body: <p>In Selenium :After launching a website how  could we  check if the right page is launched or not.</p>
  
  <p>Example: 
  If I want to launch <code>www.google.com</code>,after running the code how do I check if the same page has been launched.</p>
  
  <p>I used,</p>
  
  <pre><code>Assert.assertEquals("Correct web page",driver.findElement(By.Xpath("&lt;xpath of one of the element in the page&gt;")).isDisplayed ());
  </code></pre>
  
  <p>After running the program, I got the below error:</p>
  
  <pre><code>Exception in thread "main" java.lang.AssertionError: expected:&lt;Correct web page&gt; but was:&lt;true&gt;
  </code></pre>