Forum Discussion

dsaner's avatar
dsaner
New Contributor
7 years ago

Accessing files downloaded by automated test running in CBT browser

I have a few automated tests (Java based webdriver) that cause my application under test to generate a pdf and download it.  Next, the test picks up the file and parses it to make sure the content in...
  • dsaner's avatar
    6 years ago

    I know it's been a while since I posted this question, but as requested here is what finally worked for me.  

     

    1.  I start up an HttpsServer with a context that allows me to upload a file to the shared directory on my internal network.

    2.  I download the file in the browser on my CBT machine.

    3.  I hit the URL of my server from my CBT machine using local in the URL (i.e. https://local: port/uploadForm) and specify the downloaded file in the web form I created for the server context.

    4.  The file is uploaded to my local network and is now available for parsing, so I kill the HttpsServer.

     

    The code is a little too much for a forum post, but if requested I may be able to throw together a sample java project with all the requisite pieces.  Just wanted to let the 2 or 3 other people in the world who might want to try this know that it's possible!