18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Tree node expansion with sahi

edited November -1 in Sahi - Open Source
Hi
I am new to Sahi and I am trying to automate my web application using this tool.
My application is more similar to windows explorer it has tree pane and content pane.
Please help me to know how to deal with tree node expand event with Sahi.
Note: I am able to record tree node click event

Thanks
Vasandra Seshathri
Tagged:

Comments

  • sumeetsumeet Members
    If the Tree nodes are in span div the you can use something like _click(_spandiv("tree-node")) OR with new sahi version _click(_span("tree-node")).

    I have used JQuery selection to select the node -

    _click($("#treeWidget span:contains('Savings') span.folder:contains('Savings')")[0]); // here it depends if you have tree node level as folder or file if its file then you can use it like

    _click($("#treeWidget span:contains('Savings') span.file:contains('Regular Savings')")[0]);
  • narayannarayan Administrators
    Vasandra,

    Do you mean that you can click on the node label but not on the expand [+] icon to the left of the label?
    Is Sahi identifying the [+] icon via the controller?
  • Hi
    when I clicked on [+] it is recorded as _click(_image("Tload.gif")); when I clicked on the node label it is recorded as _click(_span("My Documents"));
    When I played back it fails in expand step.

    Thanks
    Vasandra Seshathri
  • narayannarayan Administrators
    On the controller, put _click(_image("Tload.gif")); in the evaluate expression box and click "Test ->"
    Let me know what you see. If you use firefox, could you select the tree structure, right click, view selected source and paste the source here or email it to narayan@sahi.co.in, so that I can have a look at what could be wrong?

    If you are pasting it here, make sure to add a [ code ] [/ code ] block around it and remove any urls.
  • when I did "Test->" it shown the error message like
    "[Exception] Error: The parameter passed to _click was not found on the browser"

    Thanks
    Vasandra
  • edited July 2009
    Hi
    Some one please help with this issue still i am not able to record tree node expand events

    Thanks
    Vasandra Seshathri
  • narayannarayan Administrators
    Vasandra,

    If you can email the webpage source to narayan@sahi.co.in, I will have a look at help you out.
    It is tough to fix this without looking at your web page.

    Regards,
    Narayan
Sign In or Register to comment.