Thursday, 19 September 2013

How to click on element using other related element?

How to click on element using other related element?

<ul class="ui-treenode-children">
<li aria-selected="true" aria-checked="true" aria-expanded="true"
id="frmScrForm:multiLevelTree:0_0" data-rowkey="0_0" class="ui-treenode
ui-treenode-parent folder" role="treeitem">
<span class="ui-treenode-content ui-tree-selectable"
aria-expanded="false" aria-selected="false" aria-checked="false">
<span class="ui-tree-toggler ui-icon ui-icon-triangle-1-s"></span>
<div class="ui-chkbox ui-widget tree_node_folder_expand">
<div class="ui-chkbox-box ui-widget ui-corner-all
ui-state-default">
<span class="ui-chkbox-icon ui-icon ui-icon-check"></span>
</div>
</div>
<span class="ui-treenode-icon ui-icon
tree_node_folder_collaps"></span>
<span class="ui-treenode-label ui-corner-all">
<span class="tree_node_folder_text" style="background-color:
transparent;">Company</span>
</span>
</span>
<ul class="ui-treenode-children" style="">
</ul>
</li>
</ul>
I am using selenium (selenium IDE) to test a tree, I want to click on the
check box according to the text (or value) next to it.
This is the HTML code for one node in the tree, how can I use selenium to
click at check box next to the text (company)??

No comments:

Post a Comment