title: Selenium-How to find the exact text using selenium-eclipse-mozilla
body: <p>Am new to Selenium RC and currently am using Java to run the scripts.Below is the scenario</p>
  
  <h1>Scenario</h1>
  
  <p>I am trying to login to my appliation, once i login have to find the login/user name. Once i find the login/username i will perfom/click on different link else logout.After loging in am not able to verify the text i really want to.</p>
  
  <p>Pls find the code below.</p>
  
  <p>Thanks in advance.</p>
  
  <p>import com.thoughtworks.selenium.DefaultSelenium;
  import com.thoughtworks.selenium.Selenium;</p>
  
  <p>public class TestRun {</p>
  
  <pre><code>    public static void main(String[] args) {
  
          Selenium selenium=new DefaultSelenium("localhost", 4444 , "*firefox","myurl");
          selenium.start();
          selenium.open("myurl");
          System.out.println("Open browser "+selenium);
          selenium.windowMaximize();
          selenium.type("id=j_username","Lal");
          selenium.type("name=j_password","lal");
          System.out.println(selenium.isElementPresent("id=j_username"));
          selenium.click("name=submit");
                      if(selenium.isTextPresent("Lal"))
          {
              selenium.click("id=common_header_logout");
          }
                      else
          {
              System.out.println("User not found");
          }
  
  
  }
  </code></pre>
  
  <p>}</p>