title: Unable to read a searched result using selenium 2.0
body: <p>I am running a java converted selenium 2.0 script using JDev. I have a case wherein I open a modal window and search for a string like <code>%SomeText%</code> and it results a record just below it, w/n the same window. Now, I want to make sure that that it has resulted the text I am looking for, and click OK in the modal window if I get that text. Any ideas how to do it...I am doing the following:</p>
  
  <pre><code>//this is working
  driver.findElement(By.id("_afrFilterpt1_afr__UISatr_afr_0_afr_AT1_afr__ATp_afr_t2_afr_c3::content")).sendKeys(Keys.RETURN); 
  
  //this doesn't work, text given here is part of the text which is returned after search
  assertTrue((driver.findElements(By.xpath("contains(text(),'Approved:Create Grade Ladder (AU_New Grade Ladder205, 2012-08-31)')")).size() &gt; 0) ? true:false); 
  
  //this works if above line is deleted, else this also does not work
  driver.findElement(By.xpath("//button[text()='OK']")).click();  
  </code></pre>