Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Selenium webdriver can not click jquery tree.

<td id="xmlExportForm:j_id216:j__id217:4::j_id218:handles" class="rich-tree-node-handleicon rich-tree-h-ic-line-node">
<div>
<a id="xmlExportForm:j_id216:j__id217:4::j_id218:handle" class="rich-tree-node-handle" onclick="var c = Tree.Item.findComponent(this); if (!c) return; c.fireExpansionEvent();;A4J.AJAX.Submit('xmlExportForm',event,{'similarityGroupingId':'xmlExportForm:j_id216:j__id217:4::j_id218','parameters':{'xmlExportForm:j_id216:j__id217:4::j_id218NodeExpanded':'true','xmlExportForm:j_id216:j__id217:4::j_id218AjaxExpanded':true} ,'actionUrl':'/admin/xmlExport.seam'} ); return false;" href="#">
<img id="xmlExportForm:j_id216:j__id217:4::j_id218:handle:img:collapsed" class="rich-tree-node-handleicon-collapsed" style=";border:0" src="/a4j/g/3_3_3.Finalorg.richfaces.renderkit.html.images.TreePlusImage/DATB/eAH7%21%21%21%2172fXGBgYACWpBbU_" alt=""/>
<img id="xmlExportForm:j_id216:j__id217:4::j_id218:handle:img:expanded" class="rich-tree-node-handleicon-expanded" style="display: none;;border:0" src="/a4j/g/3_3_3.Finalorg.richfaces.renderkit.html.images.TreeMinusImage/DATB/eAH7%21%21%21%2172fXGBgYACWpBbU_" alt=""/>
</a>
</div>
</td>

I tried:

 WebElement a = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("xpath selector")));
 a.click();

I clicked element, which has id = "xmlExportForm:j_id216:j__id217:4::j_id218:handle", but this do not work. How I can click on "onclick" via WebDriver? Thanks.

share|improve this question
How does it not work? What does it do? What does it not do? What exception is thrown? – Arran 16 hours ago
Timed out waiting for element to be clickable. In FireFox in mode WebDriver I try press (by dint of my mouse) on tree, nothing happens. Element not clickable. – Руслан Зекох 15 hours ago

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.