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.

Webpage does not load properly when using Sahi proxy

josue.boixjosue.boix Members
edited November -1 in Sahi - Open Source
Hello,

I'm trying to use Sahi with a visual-complex web application but the contents are not shown when loading. The web is displayed correctly when loading without using the proxy.

Could anybody help me?

Comments

  • Hi josue,

    Could you please share a sample application of visula-complex web application so that i can try from my end and help you to resolve the issue.

    Regards
    Smrithi
  • Web applications have proved to be both effective and efficient at managing the businesses.
  • Unfortunately, the web page is located in a private Intranet protected by intellectual property assets, so I am afraid I am not able to share sensitive information.

    It uses Ajax and I can be sure those controls are the ones that do not work.

    Is it necessary a special configuration to use Sahi proxy with Ajax? Thanks a lot in advance.
  • Hello again,

    The only difference between the webpage loaded normally and the webpage executed under the Sahi proxy is the following code, included in the <head> section:

    <!--SAHI_INJECT_START-->
    <script>/*<![CDATA[*//*---->*/__sahiDebugStr__="";__sahiDebug__=function(s){__sahiDebugStr__+=(s+"\n");};/*--*//*]]>*/</script>
    <script src="/_s_/dyn/SessionState_domainfix/domainfix.js"></script>
    <script src='/_s_/spr/concat.js' id='_sahi_concat'></script>
    <script src='http://sahi.example.com/_s_/dyn/SessionState/state.js'></script>;
    <script src='/_s_/spr/language_pack.js' id='langpack'></script>
    <script>/*<![CDATA[*//*---->*/_sahi.createCookie('sahisid', _sahi.sid);_sahi.loadXPathScript()/*--*//*]]>*/</script>
    <script>/*<![CDATA[*//*---->*/eval(_sahi.sendToServer("/_s_/dyn/Player_script/script.js"));/*--*//*]]>*/</script>
    <script src='/_s_/spr/playback.js'></script>
    <!--SAHI_INJECT_END-->


    Any ideas?
  • Hi josue,

    Don't worry about this code:
    <!--SAHI_INJECT_START-->
    <script>/*<![CDATA[*//*---->*/__sahiDebugStr__="";__sahiDebug__=function(s){__sahiDebugStr__+=(s+"\n");};/*--*//*]]>*/</script>
    <script src="/_s_/dyn/SessionState_domainfix/domainfix.js"></script>
    <script src='/_s_/spr/concat.js' id='_sahi_concat'></script>
    <script src='http://sahi.example.com/_s_/dyn/SessionState/state.js'></script>
    <script src='/_s_/spr/language_pack.js' id='langpack'></script>
    <script>/*<![CDATA[*//*---->*/_sahi.createCookie('sahisid', _sahi.sid);_sahi.loadXPathScript()/*--*//*]]>*/</script>
    <script>/*<![CDATA[*//*---->*/eval(_sahi.sendToServer("/_s_/dyn/Player_script/script.js"));/*--*//*]]>*/</script>
    <script src='/_s_/spr/playback.js'></script>
    <!--SAHI_INJECT_END-->
    

    Sahi inserts this jscripts so it will have it's control on tests.

    Cheers.
  • OK, then why the webpage is not properly displayed?
  • The public version of the tool does not work using Sahi either, you can try in the following address, especially the "Advanced Search" version:

    http://esearch.oami.europa.eu/copla/index
  • Hi josue,

    I think, your webpage is not displaying properly because it adds ";jsessionid=*.esearch1" to the src/href of your elements and resources i.e css, images, js, links

    That i don't know why it happened and what caused it in sahi.


    Regards.
  • Thanks for your reply. Does someone have a solution or an idea for the issue?
Sign In or Register to comment.