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.

Problems selecting a second dijit.form.DateTextBox

jorchatajorchata Members
edited November -1 in Sahi - Open Source
Hi friends :

I have a problem with a second dijit.form.DateTextBox. When I playback my script the first date is selected fine but the second doesn't. I'm using Sahi 3.5 with FireFox 4.


This is the SAHI Code :

_click(_radio("tipoBusquedaFechaProgramadaLlegada"));
_click(_span("21"));
_click(_span("29[1]"));

The last line doesn't work.

This is the HTML & Dojo Code :

<td width="35%"><label for="tipoBusquedaFechaProgramadaLlegada" >Fecha Programada de Llegada</label></td>
<td rowspan="3">
<div id="divFecha1">
<label for="txt_fecasig_desde" >Desde(dd/mm/aaaa)</label><br>
<input name="fechaInicial" id="fechaInicial" type="text" dojoType="dijit.form.DateTextBox" datePattern="dd/mm/yyyy"
rangeMessage="La fecha de inicio debe ser anterior a la fecha de fin" promptMessage="" invalidMessage="la fecha de inicio es invalida" style="font-size:13px;width:150px" onchange="validaFechaInicial">
</div>
</td>
<td rowspan="3">
<div id="divFecha2">
<label for="txt_fecasig_hasta" >Hasta(dd/mm/aaaa)</label><br>
<input name="fechaFinal" id="fechaFinal" type="text" dojoType="dijit.form.DateTextBox" datePattern="dd/mm/yyyy"
rangeMessage="La fecha de fin debe ser posterior a la fecha de inicio" promptMessage="" invalidMessage="la fecha de fin es invalida" style="font-size:13px;width:150px" onchange="validaFechaFinal">
</div>
</td>


Jorge

Comments

  • Hi :

    I could solve the problem for FireFox 4 adding _focus command but in some cases it doesn't select the second date. Does anybody knows how to select month and year for this widget (dijit.form.DateTextBox). I'm using Sahi 3.5

    _click(_radio("tipoBusquedaFechaProgramadaLlegada"));
    _click(_span("21"));
    _focus(_textbox("fechaFinal"));
    _click(_span("23"));

    In IE 8 the same script give me the following error message :

    _click(_span("24"));
    Error: The parameter passed to _click was not found on the browser at

    Thanks for your help
    Jorge
  • Hi :

    Are there any other way to select month in dijit.form.DateTextBox because the same gif has diferent index in FireFox and I8.


    _click(_radio("tipoBusquedaFechaLlegada"));
    _click(_image("blank.gif[74]"));
    _click(_span("14"));

    meanwhile in IE8 is :

    _click(_image("blank.gif[162]"));

    Jorge
  • Hi :

    I could solve the problem for IE8, it also works for FireFox

    instead of :

    _focus(_textbox("fechaFinal"));

    I used this :

    _focus(_byId("fechaFinal"));

    and It works fine in IE8

    Jorge
Sign In or Register to comment.