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.

Handling multi selects

pbpb Members
edited November -1 in Sahi - Open Source
Is it possible in sahi to record multi selects, i.e. selecting from a list, then holding ctrl, selecting another, etc.
Only we are currently getting a _click on each select, so only the last entry is selected.

Thanks.

Comments

  • Hi pb,

    Go through the description of the sahi API _setSelected(). That should sort out the things if I correctly understood your problem.
    I am reproduccing the description given there:


    _setSelected ( element, value, isMultiple)

    The parameters are:
    element:
    value: Option
  • pbpb Members
    Thanks, thats sorted our select boxes!!

    Is it possible to use this same method when selecting on a multi select table?

    Cheers.
  • Hi,

    I havnt tried it but u can give it a try..i hope it will work...:)

    Regards,
    Pankaj.
  • pbpb Members
    Having difficulty trying to select multi entries on a multi select table.
    Have tried the setSelected, but cant seem to figure how, or if this way can be used.

    Has anyone any suggestions on how i may implement his?

    Thanks
  • Hi,

    Please give a sample code. will try implementing on that.:)

    Regards,
    Pankaj.
  • pbpb Members
    Should just note we are using dojo, the dojo filtering table, which is problably why we're having difficulty!!
  • Hi Pb,

    I don't have much idea about dojo. All I could understand from net is that it is a widget, a collection of jscripts. All I can suggest is that it must be using some functions/APIs defined in those jscripts. Try calling those functions through your sahi script. It may help.

    Regards,
    Pankaj.
  • narayannarayan Administrators
    pb,
    Can you post an example somewhere so we can have a better understanding of your problem?
  • Hi all,
    firstable, thank you to the Sahi Team to provide such a good tool.

    I'm replying to this old topic as I'm having the same issue. It happens with a dojo component, but could be with any other Js component.
    Here is an example: http: // archive.dojotoolkit.org/nightly/dojotoolkit/dojox/grid/tests/test_data_grid.html
    I'd like my Sahi scripts to be able to multislect rows, that means CTRL+click on those rows.

    Do you have any idea how to do that?
    I'm using "Sahi (Build: 2010-08-20)".

    Thanks in advance for your answer.

    PS: please remove space in the url, i added them because of the "New Members can not post links" restriction
  • narayannarayan Administrators
    Hi Benjamin,

    CTRL-Click was not supported so far. We have added support for it (and other keys) now. I will send you the link to a build which has the fix.

    You will use it like this in your example page:
    _click(_cell("Africa"));
    _click(_cell("Kenya"), "SHIFT"); // shift click
    _click(_cell("Nairobi"), "CTRL"); // ctrl click
    

    Regards,
    Narayan
  • benjaminbenjamin Members
    edited September 2010
    Hi Narayan, thanks for your answer.
    That would be great. I'll wait for the link.
  • Hi Narayan,

    I also have the Sahi 2010-08-20 build and need to automate SHIFT+Click. May I have the link to the build with the fix too please?

    Thanks, Romi.
Sign In or Register to comment.