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.

ExtJs page issue

NagarajNagaraj Members
edited November 2009 in Sahi - Open Source
Hi all,

I am using Sahi tool from last one week and able to record all things and also parameterization is also possible by using txt file. One problem am facing is while recording the ExtJs pages it will record like this "_setValue(_textbox("ext-comp-1157"), "6000");" but while playback its got failed and while recording the code will be like this

_click(_button("Add Record"));
_setValue(_textbox("ext-comp-1157"), "6000");
_click(_div("01 Apr 2009 0.00"));

when i click on the "Add Record" button date will be automatically generated only i need to enter the amount while entering the amount it will record like this "_setValue(_textbox("ext-comp-1157"), "6000");"


How to overcome this problem. Please help me someone.

Comments

  • narayannarayan Administrators
    Nagaraj,

    1) Instead of using _textbox("ext-comp-1157"), use any of its alternatives (which are populated in the Alternatives dropdown on the Controller).

    2) To tell Sahi to ignore generated ids, modify Sahi.prototype.isIgnorableId function in sahi/htdocs/spr/concat.js (Regular expression to ignore ext-comp added)
    Sahi.prototype.isIgnorableId = function(id){
        // zkoss, extjs, xilinus, gmail
        return id.match(/^z_/) || id.match(/^j_id/) || id.match(/^ext[-]gen/) || id.match(/^ext[-]comp/) || id.match(/^[:]/);
        //  || id.match(/_[0-9]{10,}_/);
    };
    
  • By using firebug i got this "<div unselectable="on" class="x-grid3-cell-inner x-grid3-col-amount">6000.00</div>" in this which i can use and also one more thing concat.js i need to delete "id.match(/^ext[-]gen/)" and after i need to record it right
  • narayannarayan Administrators
    Just replace the existing isIgnorableId function with the one provided here.
    If you do not get a usable alternative, you should have a look at _near or _in.
    eg.

    _textbox(0, _near(_div("Near by label")));
  • It's worked for me thanks for the support


    Cheers.....!
Sign In or Register to comment.