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.

Bugreport Input event not firing

mopmop Members
edited January 2013 in Sahi - Open Source
Not sure if this is the right place but i couldn't find a proper bugtracker.

We are using angularjs and tried to do automatic testing with SAHI. However the angular models lying on input boxes won't get updated when SAHI fills out a form.

We have found the reason for this and patched SAHI locally so that it works. The reason this combination doesn't work is because angular relies on a new HTML5 event called "input" for noticing text changes. This is not fired when using SAHI.

We have hacked the cocat.js locally and changed

Sahi.prototype.simulateKeyPressEvents

"this.simulateKeyEvent([keyCode, 0], el, "input", combo);" at the end of the function fixes the problem for us. Is there any chance to incorporate that fix into SAHI? We are using the OpenSource variant.

Comments

  • narayannarayan Administrators
    Hi mop,

    Thanks for this. Is there a sample page where we can reproduce and test this?

    Thanks,
    Narayan
  • mopmop Members
    https://mega.co.nz/#!c9ASSJTI!Q2MH2FWhLiFsSSojas_suEwKd1IfI4u0fKhECmIGLCg

    ./testrunner.sh testung.sah http://localhost chrome

    Please note that the fix doesn't work on (older) IEs out of the box. It seems IE fails when dispatching unknown events. Still investigating.

    Angular binds the values of the form to its model "xxx". Due to its two way databinding changes to xxx should immediately change the content of {{ xxx }}. This is done using the HTML5 input event in angular.
Sign In or Register to comment.