title: Finding the searched text in google search result with selenium webdriver in Chrome
body: <p>I am new to selenium webdriver and having a problem</p>
  
  <p>i googled something and the result appeared.now  i want to see if the first 5 results contain the searched text or not.</p>
  
  <p>as example: </p>
  
  <p>i want to search for the text "selenium webdriver". now i want to check if the first 5 results contains the text "selenium webdriver" or not.</p>
  
  <p>Here is my part:</p>
  
  <pre><code>chromeDriver.Navigate().GoToUrl("http://www.google.co.uk");
  
  IWebElement searchText = chromeDriver.FindElement(By.XPath(".//html/body/div[3]/div/div/div[2]/div[2]/div/form/fieldset[2]/div/div/div/table/tbody/tr/td[2]/div/input"));
  searchText.SendKeys("selenium webdriver");
  
  IWebElement searchButton = chromeDriver.FindElement(By.Name("btnG"));
  searchButton.Click() ;
  
  IWebElement resultingText = chromeDriver.FindElement(By.LinkText("selenium webdriver"));
  </code></pre>
  
  <p>this line is throwing an exception : </p>
  
  <pre><code>// IWebElement resultingText = chromeDriver.FindElement(By.LinkText("selenium webdriver"));
  </code></pre>
  
  <p>can any one help me in this issue?</p>