Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, windows and java based applications. Get your 30 day free trial.

Discuss your Sahi Pro usage patterns, best practices, problems and solutions. Help others solve their problems and seek help from the community when needed. If you need specific support on your application, please email support @ sahipro.com

Error downloading excel file via https

BstokerBstoker Members
edited November -1 in Sahi - Open Source
When Sahi is active using the localhost proxy setting on port 9999 IE throws an error message when attempting to download a file (see error message below). If Sahi is deactivated (i.e. no proxy settings) the excel file downloads correctly and displays in a new Excel application window.

The error message is "Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found"

The environment is secured via HTTPS and I am able to access the site and navigate using Sahi, I just cannot download the excel file from the site.

Is there some option/configuration that needs to be set that governs how Sahi handles document downloads?
Tagged:

Comments

  • narayannarayan Administrators
    Bstoker,

    Can you please try this and let us know the results:

    1) Copy the url of the download link into another browser tab (with Sahi on)
    2) Check what the message on the browser is.
    3) Check the Sahi console to see if there are any messages printed on that.
    4) Check to see if the desired file has been downloaded to sahi/temp/download folder.

    Regards,
    Narayan
  • BstokerBstoker Members
    I don't have a direct URL to copy. The generation of the excel file happens on the server. Included is a sample of the source:

    <li class="ExportExcel"><a href="javascript:__doPostBack('ctl00$cphMain$maMoreActions$ctl01','')"><img src="../../CSS_Themes/Web/Images/ExportIcon.gif" style="border-width:0px;" /><span>Export to Excel</span></a></li>

    When I click the 'Export to Excel' link, the system execute the javascript which in turn generates an excel file in MS Excel. My developer says the system is sending HTTP as a mime content type of application/ms-excel.

    I've confirmed that nothing is displayed on the sahi console other than the default startup text:
    >>>> Sahi started. Listening on port:9999
    >>>> Configure your browser to use this server and port as its proxy
    >>>> Browse any page and CTRL-ALT-DblClick on the page to bring up the Sahi Cont
    roller

    I've also confirmed that nothing is in the ..\temp\download directory
  • narayannarayan Administrators
    Bstoker,

    We will need to look at the logs in some more detail to identify the problem.

    Navigate to the page where the download links is
    Stop the proxy
    Open sahi.properties, set debug.traffic.log = true
    Restart the proxy
    Click the download file button.
    Stop the proxy once you see the error message.
    Go to sahi/logs/traffic
    You will see a lot of folders. Look for one with the file name to be downloaded.
    If you do not find it, look for the latest file that was created.
    Zip that folder and email it to me and I will have a look at it.

    We could also do a net meeting via Zoho if that is fine with you, so that I can look at what is happening on your system.

    Regards,
    Narayan
  • BstokerBstoker Members
    Narayan,

    I've run through the process again using the debug option specified and the results are posted below. The results are contained in the file called response.header.

    HTTP/1.1 200 OK
    X-AspNet-Version: 2.0.50727
    Date: Tue, 26 May 2009 18:32:02 GMT
    Content-Length: 11743
    Content-Disposition: attachment; filename=gvGrid.xls
    Content-Transfer-Encoding: binary
    Content-Type: application/xls
    X-Powered-By: ASP.NET
    Proxy-Connection: close
    Pragma: no-cache
    Cache-Control: no-cache
Sign In or Register to comment.