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.

Sahi script inserted before the page is fully loaded

Fabien RoyFabien Roy Members
edited November -1 in Sahi - Open Source
Hello,

The site I want to use Sahi on has a javascript Calendar element that works like that:
<input type="text" name="xxx"><a href="#"><img id="xx" src="calendar.gif" onclick="javascript_function(); return false;"></a>

The corresponding field is mandatory and it is not possible to set the date without selecting it in the calendar (_setValue(_textbox() does not work)

Sahi script:
_click(_image("Click here to choose a date"));
_click(_cell("13"));

when I execute the script and look at the IE window, I see that the calendar helper is opened, and then the page seems to reload, and it seems that the following script is inserted before the page is fully loaded, resulting in a javascript error and a white page.
<!----><!--SAHI_INJECT_START--><script src='/_s_/spr/playback.js'></script><!--SAHI_INJECT_END-->

Also, when I use the recorder, it is extremely slow each time I select a date.

Can you please help me out?
Should I be using exclude_inject.txt, or use a wait somewhere?

Thank you in advance and best regards
Fabien

Comments

  • narayannarayan Administrators
    Hi Fabien,

    Can you point out a sample page where we can test this out?

    Regards,
    Narayan
Sign In or Register to comment.