Note that there are some explanatory texts on larger screens.

plurals
  1. PONot able to click on the nested anchor element using xpath of selenium webdriver
    text
    copied!<p><em><strong>Please find the Html below :</em></strong></p> <pre><code>&lt;table class="data" id="filteredTable" cellpadding="0" cellspacing="1"&gt; &lt;tbody&gt; &lt;tr class="rowLight"&gt; &lt;td class="lt4"&gt;&lt;input name="ids" value="att1" type="checkbox"&gt;&lt;/td&gt; &lt;td&gt;&lt;a hfref= " link1" &gt; foo &lt;/a&gt; &lt;/td&gt; &lt;td&gt;item1&lt;/td&gt; &lt;td&gt;item2&lt;/td&gt; &lt;td&gt;item3&lt;/td&gt; &lt;/tr&gt; &lt;tr class="rowDark"&gt; &lt;td class="lt4"&gt;&lt;input name="ids" value="att2" type="checkbox"&gt;&lt;/td&gt; &lt;td&gt;&lt;a hfref= " link2" &gt; boo &lt;/a&gt; &lt;/td&gt; &lt;td&gt;item1&lt;/td&gt; &lt;td&gt;item2&lt;/td&gt; &lt;td&gt;item3&lt;/td&gt; &lt;/tr&gt; &lt;tr class="rowLight"&gt; &lt;td class="lt4"&gt;&lt;input name="ids" value="att3" type="checkbox"&gt;&lt;/td&gt; &lt;td&gt;&lt;a hfref= " link3" &gt; bar &lt;/a&gt; &lt;/td&gt; &lt;td&gt;item1&lt;/td&gt; &lt;td&gt;item2&lt;/td&gt; &lt;td&gt;item3&lt;/td&gt; &lt;/tr&gt; </code></pre> <p>Now I need to click on the link of <code>bar</code>. But my below <code>Xpath</code> not helping me to get into the bar as well. So any help how to be done the same.</p> <p>I didn't give the <code>html</code> for the part <code>//form[contains(@name,'filterset_FilterSetListForm')]/table[contains(@class,'contentBody')]/tbody/tr/td/table[contains(@class,'content')]/tbody/tr/td/</code>. &lt;~~ till this I am correct. Confusion start after <strong><em><code>&lt;tr&gt;</code></em></strong> from here <code>/table[contains(@id,'filteredTable')]/tbody/tr</code></p> <p><em><strong>Part-II:</em></strong></p> <p>When there will be a match say <code>bar</code> , can their associated <code>check box (s)</code> be clicked?</p> <p>Any help in this regard?</p> <p>I am using <strong><em><code>selenium -web driver</code></em></strong> with <code>Ruby 1.9.3</code> .</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload