We are testing a web application using selenium and are trying to simulate the fancy tree expand event using the following
driver.findElement(By.xpath("//div[@id='tree']/ul/li/span/span[@class='fancytree-expander']")).click();
The fancytree looks like this in the jsp
<div id="tree"></div>
The js code looks like this
$("#tree").fancytree({
extensions: ["filter"],
filter: {
autoApply: true, // Re-apply last filter if lazy data is loaded
counter: false, // Show a badge with number of matching child nodes near parent icons
hideExpandedCounter: true, // Hide counter badge, when parent is expanded
mode: "hide" // "dimm": Grayout unmatched nodes, "hide": remove unmatched nodes
},
checkbox: true,
selectMode: 3,
quicksearch: true,
source: {
url: ...
},
lazyLoad: function(event, data) {
...
},
loadError: loadError,
collapse: function(event, data) {
}
});
Can you let us know how can we simulate a fancy tree event click?