Hi,
I have a javascript tree problem where I need to search for a
particular node. To do this I need to expand each branch in order to
see the contents under the node clicked.
The problem I am having is that the plus and minus icons aren't images
like in the example provided in "
http://wiki.openqa.org/display/WTR/
JavaScript".
An example of the html is:
<div class="myTree" style="border: none;">
<div id="233" class="asyncNavTree jstree jstree-0 jstree-focused
jstree-default" style="">
<li id="233_1238" class="jstree-closed">
<ins class="jstree-icon"> </ins>
<a class="treeNodeLink sectionPopupInit" title="node1">
</li>
<li id="233_1455" class="jstree-closed">
<ins class="jstree-icon"> </ins>
<a class="treeNodeLink sectionPopupInit" title="node2">
</li>
<li id="233_5416" class="jstree-open">
<ins class="jstree-icon"> </ins>
<a class="treeNodeLink selectedTreeNode sectionPopupInit jstree-
clicked" title="node3">
</li>
<li id="401_1685" class="jstree-closed">
<ins class="jstree-icon"> </ins>
<a class="treeNodeLink sectionPopupInit" title="node4">
</li>
From using FireBug, the icon I want to click directs me to the line
<ins class="jstree-icon"> </ins>
I attempted to extend watir to support this,
module Watir
class Ins < NonControlElement
TAG = 'INS'
end
end
which allows me to navigate through the tree like I want using
indexes, but when I attempt to use
browser.ins(:class, "jstree-icon").click
the button flashes, but does not expand...
The weird thing about this is I had it working the first time I tried
it.... I wonder why it stopped working...
Can anyone help me?
A summary of the above:
- I want to click the jstree icons to expand
- icons aren't images like the faq page
- I am able to iterate through the icons by extending watir
- .click method on my ins tag does not work?
Thanks for reading