Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9253145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:08:37+00:00 2026-06-18T11:08:37+00:00

We test an application developed in house using a python test suite which accomplishes

  • 0

We test an application developed in house using a python test suite which accomplishes web navigations/interactions through Selenium WebDriver. A tricky part of our web testing is in dealing with a series of pdf reports in the app. We are testing a planned upgrade of Firefox from v3.6 to v16.0.1, and it turns out that the way we captured reports before no longer works, because of changes in the directory structure of firefox’s temp folder. I didn’t write the original pdf capturing code, but I will refactor it for whatever we end up using with v16.0.1, so I was wondering if there’ s a better way to save a pdf using Python’s selenium webdriver bindings than what we’re currently doing.

Previously, for Firefox v3.6, after clicking a link that generates a report, we would scan the “C:\Documents and Settings\\Local Settings\Temp\plugtmp” directory for a pdf file (with a specific name convention) to be generated. To be clear, we’re not saving the report from the webpage itself, we’re just using the one generated in firefox’s Temp folder.

In Firefox 16.0.1, after clicking a link that generates a report, the file is generated in “C:\Documents and Settings\ \Local Settings\Temp\tmp*\cache*”, with a random file name, not ending in “.pdf”. This makes capturing this file somewhat more difficult, if using a technique similar to our previous one – each browser has a different tmp*** folder, which has a cache full of folders, inside of which the report is generated with a random file name.

The easiest solution I can see would be to directly save the pdf, but I haven’t found a way to do that yet.

To use the same approach as we used in FF3.6 (finding the pdf in the Temp folder directory), I’m thinking we’ll need to do the following:

  1. Figure out which tmp*** folder belongs to this particular browser instance (which we can do be inspecting the tmp*** folders that exist before and after the browser is instantiated)
  2. Look inside that browser’s cache for a file generated immedaitely after the pdf report was generated (which we can by comparing timestamps)
  3. In cases where multiple files are generated in the cache, we could possibly sort based on size, and take the largest file, since the pdf will almost certainly be the largest temp file (although this seems flaky and will need to be tested in practice).

I’m not feeling great about this approach, and was wondering if there’s a better way to capture pdf files. Can anyone suggest a better approach?

Note: the actual scraping of the PDF file is still working fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:08:39+00:00Added an answer on June 18, 2026 at 11:08 am

    We ultimately accomplished this by clearing firefox’s temporary internet files before the test, then looking for the most recently created file after the report was generated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the WatiN, but when i developed my application test, i was using
I have developed a android application which I want to test on multiple devices
I want to test my iPhone web Application developed in localhost (XAMPP) in my
I've developed my application using my 3G device to test with. Upon giving this
I am building a test application using MVC3, Razor, and Entity Framework 4.1 with
I have this application developed for Blackberry 4.5. I´m using Eclipse, and I want
I have developed an application using last SDK (4.3) and XCODE 4. I have
I have developed an application using Entity Framework , SQL Server 2000, Visual Studio
I've developed an application using the Microsoft Sync Framework 2.1 SDK and my current
I developed an application in android, I need to test the application on samsung

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.