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.

pdf upload file

alamoonalamoon Members
edited November -1 in Sahi - Open Source
hi,
how can upload pdf files throw pop up window?
thanks for your help

Comments

  • Please refer to this post,
    http://sahi.co.in/forums/viewtopic.php?id=1299

    Let me know, whether it helps or not

    Thanks,
    Venky.
  • thank you for reply.
    i want to download a pdf file from a url for example:

    "www-wjp.cs.uni-sb.de/publikationen/Skript.pdf" in this case my program don't get to the next step.
    It works (it's automaticly downloaded) in cases where the file in google doc stored.

    thank you
  • VenkyVenky Members
    edited January 2010
    Try using this code,
    _navigateTo("http://www-wjp.cs.uni-sb.de/publikationen/Skript.pdf");
    

    Sahi would automatically download files to the file system into a folder sahi/userdata/temp/download. You should then be able to use _lastDownloadedFileName, _saveDownloadedAs, and _clearLastDownloadedFileName. If the file is not downloading automatically, add

    application/pdf
    application/x-pdf
    application/acrobat
    applications/vnd.pdf
    text/pdf
    text/x-pdf

    to
    sahi/userdata/config/download_contenttypes.txt

    I tried this and it worked for me. If its not working for you, can you specify which version of sahi you are using?

    Let me know, if you have any further more problems in downloading files using sahi.

    Thanks,
    Venky.
  • hi,
    it didn't work :-), my sahi version is v3.
    thank you
  • hi,
    how to use : _navigateTo with a vrariable like this:

    _navigateTo($linkArray[0]);

    it doesnt work :-(
  • narayannarayan Administrators
    Hi alamoon,
    What is in $linkArray[0]?
  • hi,
    there is a link:
    i save all the links on a google search page in the array "linkarray"and i want to navigate to each of them to upload the pdf files.
Sign In or Register to comment.