title: Find by xpath table without id, name and class. Selenium C#
body: <p><a href="http://i.stack.imgur.com/IUraL.png" rel="nofollow">the HTML TAG HERE</a></p>
  
  <p>Here is the <em>HTML</em> about my problem, I am pretty new in <em>xpath</em>... I just want to create a <em>xpath</em> in c# wherein i will click the clock in and clock out button. I know my question is basic but im having a hard time figuring out.</p>
  
  <p>here is the <em>HTML</em> </p>
  
  <pre><code>&lt;table&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;img height="1" src="/images/px.gif" width="10"&gt;&lt;/td&gt;
              &lt;td align="left"&gt;
                  &lt;table cellspacing="4" class="btn" onmousedown=
                  "return sbtnDown(this);" onmouseout="sbtnOut(this)"
                  onmouseover="sbtnOver(this)" onmouseup=
                  "timeSheetAction2(&amp;quot;TIME_SHEET_PUNCH&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;IN&amp;quot;,true)"
                  width="100%"&gt;
                      &lt;tbody&gt;
                          &lt;tr&gt;
                              &lt;td&gt;&lt;img src="/images/20x20/clock_go.png"&gt;&lt;/td&gt;
                              &lt;td align="left" nowrap width="100%"&gt;Clock In&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/tbody&gt;
                  &lt;/table&gt;
              &lt;/td&gt;
              &lt;td&gt;&lt;img height="1" src="/images/px.gif" width="40"&gt;&lt;/td&gt;
              &lt;td align="center"&gt;
                  &lt;table cellspacing="4" class="btn" onclick=
                  "window.showPopUp_Lookup({&amp;quot;center&amp;quot;:1,&amp;quot;w&amp;quot;:780,&amp;quot;title&amp;quot;:&amp;quot;Change Cost Centres&amp;quot;,&amp;quot;singleValue&amp;quot;:1,&amp;quot;h&amp;quot;:800,&amp;quot;url&amp;quot;:&amp;quot;/ta/6118466.admin?rnd=EYH&amp;amp;@impl=zeyt.ta.ui.time.UiControl_ChangeCostCenters&amp;amp;@windowId=QLYTJ&amp;amp;Ext=login&amp;amp;sft=PYPBHDQTFA&amp;amp;@showStackMB=0&amp;amp;@pushOnStack=0&amp;amp;@noBG=1&amp;amp;MyLookupName=CHANGE_COST_CENTERS&amp;amp;which_cc_can_change=1&amp;quot;,&amp;quot;fName&amp;quot;:&amp;quot;z230&amp;quot;});return false;"
                  onmousedown="sbtnDown(this)" onmouseout="sbtnOut(this)"
                  onmouseover="sbtnOver(this)" width="100%"&gt;
                      &lt;tbody&gt;
                          &lt;tr&gt;
                              &lt;td&gt;&lt;input name="z230" onchange=
                              "this.chkChng=0;timeSheetAction2(&amp;quot;TIME_SHEET_PUNCH&amp;quot;, this.value, &amp;quot;CHANGE_CC&amp;quot;, true);"
                              type="hidden"&gt;&lt;img src=
                              "/images/20x20/clock_refresh.png"&gt;&lt;/td&gt;
                              &lt;td align="left" nowrap width="100%"&gt;Change Department&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/tbody&gt;
                  &lt;/table&gt;
              &lt;/td&gt;
              &lt;td&gt;&lt;img height="1" src="/images/px.gif" width="40"&gt;&lt;/td&gt;
              &lt;td align="right"&gt;
                  &lt;table cellspacing="4" class="btn" onmousedown=
                  "sbtnDown(this)" onmouseout="sbtnOut(this)" onmouseover=
                  "sbtnOver(this)" onmouseup=
                  "timeSheetAction2(&amp;quot;TIME_SHEET_PUNCH&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;OUT&amp;quot;,true)"
                  width="100%"&gt;
                      &lt;tbody&gt;
                          &lt;tr&gt;
                              &lt;td&gt;&lt;img src=
                              "/images/20x20/clock_cancel.png"&gt;&lt;/td&gt;
                              &lt;td align="left" nowrap width="100%"&gt;Clock Out&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/tbody&gt;
                  &lt;/table&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Here are the method I've already tried but still no luck...</p>
  
  <pre><code>browser.FindElementsByXPath("//td[contains(., 'Clock In')]");
  
  browser.FindElementsByXPath("//id('PAGE_BODY')/x:table[1]/x:tbody/x:tr/x:td[2]/x:table/x:tbody/x:tr/x:td[2]"); #I got this xpath using xpather a firefox plugin
  </code></pre>