title: Detect text in the form with selenium
body: <p>I am trying to write a java script using selenium web driver to verify if a user already exist during the sign up .
  when a user access to my website he click on "become a tinze" <a href="https://i.stack.imgur.com/CVIN5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CVIN5.jpg" alt="home page of my site"></a></p>
  
  <p>then he complete the form and clique on "join" <a href="https://i.stack.imgur.com/mcFok.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mcFok.png" alt="sign up form"></a></p>
  
  <p>if the mail already exist message "Email Already exist" displayed .<a href="https://i.stack.imgur.com/vrIOL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vrIOL.png" alt="Email Already exist"></a></p>
  
  <p>my script successfully complete the form but it can't detect the message "Email Already exist"</p>
  
  <p>here is the html code of the message that I'm trying to detect</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;p name="already" style="color:Red;" class="ng-binding"&gt;Email Already exist&lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>and here is the code I use to verify if the text is displayed but it always show me detected</p>
  
  <pre><code>     driver.findElement(By.cssSelector("span.ng-scope")).click();
      int v = 0,i=0;
      System.out.println("enter while");
         while(v==0){
     try{
       WebElement txtbox_username = driver.findElement(By.id("firstname"));
          if(txtbox_username.isDisplayed()){
              v=1;
              System.out.println("Complete the forme");}}
      catch(NoSuchElementException nsee){
      i++;
       System.out.println("Try number:"+i); }}  
       driver.findElement(By.id("firstname")).sendKeys("haha");
       driver.findElement(By.id("lastname")).sendKeys("haha");
       driver.findElement(By.name("email")).sendKeys("hah@ahla.com");
       driver.findElement(By.id("password")).sendKeys("yassiryakhlaf");
        driver.findElement(By.id("signmeup")).click();
        System.out.println(driver.findElement(By.id("firstname")).getText());  
        try {Boolean display =  driver.findElement(By.xpath("//p[@name='already']")).getText().equals("Email Already exist");
        if (display){System.out.println("detected");}
        else{System.out.println("not detected");}
        } catch (NoSuchElementException e) {System.out.println("nott detected");}
  </code></pre>
  
  <p>when I try here is the result <a href="https://i.stack.imgur.com/Ydzs3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ydzs3.png" alt="even message displayed it can&#39;t be detected by selenium"></a></p>