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.

Date Picker

ranjprashantranjprashant Members
edited November -1 in Sahi - Open Source
hi,
In my website there is Date Picker in form of Text Box and Clicking on it opens date picker where i can select year, month day also Previous and Next clickable icon.

Now i record the steps..after selecting 14/06/1982..

But in script i'm only getting code like "_click(_link("14"));"

also checking in Controller by pressing "Test--->" , getting message as "undefined".

Please suggest me how to select a particular date, month or year from Date picker.

Comments

  • Hi ranjprashant,

    Can you let me know which frame work are you using to select date from datepicker

    Could you post the example of that datepicker.

    Please go through the following links,

    http://sahi.co.in/forums/viewtopic.php?id=3527

    http://sahi.co.in/forums/viewtopic.php?id=2793

    http://sahi.co.in/forums/viewtopic.php?id=1060

    http://sahi.co.in/forums/viewtopic.php?id=2609

    This might help you.

    Regards,
    Theeran.
  • Hi Theeran,
    Thanks for reply.

    Here i'm using JSF framework , and previously i go through all the above post topics. but i havn't get any solution.
  • Hi ranjprashant,

    We have tried with our own script to pick a date from a jsf Datepicker.

    The url is

    http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf

    and the script, we used is
    _click(_div("sample-container"));
    _click(_image("eAH7cW0fw6znAA8XBA4_.jsf"));
    _click(_cell("22"));
    _click(_div("Today"));
    _click(_div("Apply"));
    

    We are able to pick the date from the DatePicker and populate during playback.

    Try in the similar manner.

    This might help you.

    Regards,
    Theeran.
  • Hi..
    I tried it, but during play back wht should be d script for selecting different Day/Month/year.
  • Hi ranjprashant,

    With the same url specified, try with the following script,
    _click(_cell("rich-tabpanel-content content_tab "));
    _click(_image("eAH7cW0fw6znAA8XBA4_.jsf"));
    _click(_div("<"));
    _click(_div("January, 2012"));
    _click(_div("2011"));
    _click(_div("Nov"));
    _click(_span("OK"));
    _click(_cell("23"));
    _click(_div("Apply"));
    

    You will be able to select different Day/Month/Year.

    In jsf Datepicker, each elements are configured as individual div's. so try to identify the elements through controller and you can select any Day/Month/Year.

    Regards,
    Theeran.
  • FaiyazFaiyaz Members
    Hi,
    I am new in sahi testing. How to handle datepicker & time in .Net.
  • Hi Faiyaz,

    Please go through the above mentioned links.Sahi is independent of the web server; anything that runs on the browser can be automated using Sahi.

    So datepicket and time in .Net should be accessed in the similar manner as with the normal DatePicker and Time.

    Regards,
    Theeran.
Sign In or Register to comment.