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.

_click(_cell("1[0]"),_under(_cell("Fri"))); is not working for second

sujatasujata Members
edited November -1 in Sahi - Open Source
In my application in one screen we have two fields of datepicker.For one field I have written "_click(_cell("1[0]"),_under(_cell("Fri")));" in script and it is taking exact the value ubder the Fri cell,but the for second date picker field it is not taking the exact value.
can any one send me the solution.
Regards
Sujata

Comments

  • SumitraSumitra Members
    Hi sujata,

    You can use DOM relation as per your page.

    Kindly check this URL for zkoss site:

    http://www.zkoss.org/zkdemo/input/date_and_time_picker

    and the script for this datepicker is as below:
    _setStrictVisibilityCheck(true);
    _click(_italic("/z-datebox-rounded-btn/", _near(_span("Medium :"))));
    _click(_cell("/13/"));
    _click(_italic("/z-datebox-rounded-btn/", _near(_span("Long :"))));
    _click(_cell("/13/"));
    _setStrictVisibilityCheck(false);
    

    Here, _setStrictVisibilityCheck(true); makes Sahi ignore elements which are not visible.

    _setStrictVisibilityCheck(false) makes sahi revert to original behavior of considering all elements in the DOM.

    This API is useful in cases where widgets are dynamically created at multiple locations but only one of them is visible at any given time.

    Let me know if this solves your issue.

    Regards
    Sumitra
Sign In or Register to comment.