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.

No trace available:undefined error

edited November -1 in Sahi - Open Source
Hi,
On a webpage a text is there like:"Timesheet".
On moving the mouse (not clicking) over this text a dropdown list is opening with two links in it.
Those are;"Timesheet entry" and "Pending Time Sheet".

I am able to record the clicking of "Timesheet entry".But playback is getting fail showing the error:
"undefined: undefined
No trace available Click for browser script [object JavaObject]".

But in the older version of sahi(sahi_20081026) I am able to playback the same script successfully although i am getting an warning in the log file as:"undefined: document.getElementById("ctl00_ContentPlaceHolder_ImgMsg") is null
No trace available Click for browser script"

thnx

Comments

  • narayannarayan Administrators
    In the new version of Sahi, only visible elements will be clickable. So you will have to hover over the "Timesheet" text and then click.
    Add a _mouseOver(_spandiv("Timesheet")) before clicking on the menu item.

    I am assuming _spandiv("Timesheet") is the accessor here. Replace it with the accessor for "Timesheet".
  • Tnx a lot Narayan,

    Here the accessor is _link(""Timesheet);so i modified the code like this:

    _mouseOver(_link("Timesheet"));
    _click(_link("Timesheet Entry"));


    And it is working fine now.
  • sumeetsumeet Members
    It doesn't work for me with
    _mouseOver(_spandiv("Sales"));
    _click(_link("Account Opening"));

    I tried the nightly build 03/23 as well.

    It used to work in previous build and in actual there must be many users who have written their scirpt without including the mouseover and just clicking the link inside the spandiv. So accomodating this change would be difficult task.

    Narayan - you might need to look some other options of keeping the old stuff working.
  • narayannarayan Administrators
    Yes Sumeet,
    That makes sense. I will make it configurable to check for visibility. Meanwhile you can do this:
    In sahi/htdocs/spr/concat.js, add this at the end:
    Sahi.prototype.checkVisible = function (el) { return true; }
    
    You can also add it to any of your scripts directly at the top, if you do not want to add it to concat.js .
Sign In or Register to comment.