title: How to check a specific value is displayed inside a table in Selenium Web driver
body: <p><a href="https://i.stack.imgur.com/kqW6q.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kqW6q.jpg" alt="Active"></a></p>
  
  <p>I am trying to validate a specific text inside a Table in a web page. the text is "ACTIVE". There are other places on the same page which displays the same text. But I wanted to check "ACTIVE" within that table.</p>
  
  <p>I tried using driver.getPageSource().contains("ACTIVE"); - However, this validates the entire page. </p>
  
  <p>The Xpath of the element is :</p>
  
  <p>html/body/table/tbody/tr/td[2]/form/table[2]/tbody/tr<a href="https://i.stack.imgur.com/kqW6q.jpg" rel="nofollow noreferrer">1</a>/td/table<a href="https://i.stack.imgur.com/kqW6q.jpg" rel="nofollow noreferrer">1</a>/tbody/tr/td/table[4]/tbody/tr/td<a href="https://i.stack.imgur.com/kqW6q.jpg" rel="nofollow noreferrer">1</a>/table/tbody/tr[6]/td[2]</p>
  
  <p>And here the html below </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;body leftmargin="2" topmargin="2" onload="initializeData()" marginwidth="2" marginheight="2" bgcolor="#ffffff"&gt;
  &lt;table width="756"&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td width="9"/&gt;
  &lt;td width="764"&gt;
  &lt;form frm_id="frm" name="frm"&gt;
  &lt;table width="754" cellspacing="0" cellpadding="0" border="0"&gt;
  
  &lt;table height="629" width="763"&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td height="625" width="770"&gt;
  &lt;table width="728"&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td&gt;
  &lt;table height="10" width="739" cellspacing="0" cellpadding="0" border="0"&gt;
  &lt;table height="10" width="736" cellspacing="0" cellpadding="0" border="0"&gt;
  &lt;table height="4" width="740" cellspacing="0" cellpadding="0" border="0"&gt;
  &lt;table height="86" width="100%" border="1"&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td height="80" width="33%" valign="top"&gt;
  &lt;table height="267" width="103%" border="0"&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;tr&gt;
  &lt;tr&gt;
  &lt;tr&gt;
  &lt;tr&gt;
  &lt;tr&gt;
  &lt;td height="20" width="47%" align="left"&gt;Current Status&lt;/td&gt;
  &lt;td height="20" width="155%"&gt;
  &lt;b&gt;:&lt;/b&gt;
   ACTIVE 
  &lt;/td&gt;
  </code></pre>