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.

javascript on html page does not execute properly

keatskeats Members
edited November -1 in Sahi - Open Source
Hi Narayan,
This issue was discussed before @ http://sahi.co.in/forums/viewtopic.php?id=997

I am facing the same issue in new version of sahi.
Any fixes for this yet.

You had asked me to increase the response length setting earlier and i did that and use to work except for sometimes.

Now in new version it seems to be broken? exactly why is it happening?
I have set my response lenght = 4000.

Please let me know
Will be great help. I am not able to proceed because of this.

Comments

  • narayannarayan Administrators
    Hi Keats,

    response.sample_length = 4000 is too large. The value should be less than 2000. As specified, keep it at 350 or 450 or some nearby value which works. The bug seems to be some problem with Java BufferedInputStream and the way we mark, read and reset it.

    Regards,
    Narayan
  • I Appreciate your quick response.

    hmm ok. I will change that to 450 for now.
    But will be great if there is a fix for this asap.
    Thanks so much.
  • narayannarayan Administrators
    Keats, there is nothing to fix here. You just need to change the value to 450 or so, and it should work. This problem is in Java's code and not in Sahi. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4616869

    Just note that response.sample_length HAS to be lesser than 2000 characters.
  • Hi Narayan,

    Making response.sample_length = 450 or something like 1500,400, 350 etc.did not resolve the issue.

    I was discussing these issue with java developer in my office and we were trying to enable
    logs to see where there is an error and what kind of execption it might throw.

    how do i enable the logs to debug?
    And also if in sahi code where is this read buffer length set.
    I mean any sort of pointers will greatly help at least coming up with work around.

    When we were debugging this issue in a new machine I noticed few things as stated below. You might know this.:-)

    1. executed 1 sample scripts on my web page. It ran few steps until it reloaded to next page and javascript was printed as it is on the page and below it shows the rest of the page but since javascript was not executed on browser it disabled the buttons.
    2. Now i stop at this step [using stop button]
    3. And then refresh the page using F5.
    4. This time it has executed the page successfully.
    But the same page when sahi reloads when 'set' button is used and script runs, it gives this issue.
Sign In or Register to comment.