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.

Slow script error

creadecreade Members
edited November -1 in Sahi - Open Source
IE8 is throwing a slow script error when we try and run the following command (in tests/playback or "evaluate expression"):

_popup("Editor")._click(_image("Menu, _near(_span("Activity))));

It works in firefox though.

Comments

  • narayannarayan Administrators
    Hi CReade,

    Could you please try this:

    Open sahi/htdocs/spr/concat.js
    Search for
                for (var i=1; i<7; i++){
                    parents[parents.length] = this.getParentNode(relations.element, "ANY", i);
                }
    

    Replace it with
                for (var i=1; i<5; i++){
                    parents[parents.length] = this.getParentNode(relations.element, "ANY", i);
                }
    
    (We are reducing the number of parent elements to look up)

    Restart Sahi, clear browser cache and check again.

    Regards,
    Narayan
  • Thanks for getting back to us (in both ways). Switching it to loop 4 times fixed one use of _near but most of them still error out. For now we're using a registry hack (Microsoft kb 175500) to stop the errors from appearing. We may switch to xpath + Javascript-XPath.
  • narayannarayan Administrators
    Hi Creade,

    It looks like there is some element nearby which is rather heavily nested. If we could do a desktop share session to see how your UI is, we may be able to fix this.

    Regards,
    Narayan
Sign In or Register to comment.