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

  • SEARCH
  • Home
  • 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 8218189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:42:23+00:00 2026-06-07T12:42:23+00:00

We use a Jenkins-Slave to execute Selenium Gui test. The slave is started using

  • 0

We use a Jenkins-Slave to execute Selenium Gui test. The slave is started using WebStart and runs on a Windows 7 machine. The test contains the downloading of PDF files that should be checked for existence as well as correctness by looking up texts in it. The problem is, the running Selenium tests do not see the files downloaded by firefox. In fact the process doesn’t seem to see any file in the directory.

The test runs just fine if I execute it on my local machine, straight from the IDE rather than using Jenkins or WebStart at all.

I already considered the following:

  • Am I checking the wrong directory? No, I copied the file.getAbsolutePath() to the windows explorer and can see the files. I’m also pretty sure I’m on the right machine.
  • Is it a timing issue? E.g. is the file not finished downloading? No, I use WebDriverWait and wait for 30 seconds to find the file, while it takes actually round abound 1 sec to create and download the PDF:

    WebDriverWait wait = new WebDriverWait(driver, 30, 1000);
       wait.until(new Predicate<WebDriver>(){
         public boolean apply(WebDriver driver){
           try{
             log.info("file: " + pdfFile.getAbsolutePath() + ", exists: " + pdfFile.exists() + ", size: " + pdfFile.length());
             // test files content ...
           }
           catch (IOException e){
             return false;
           }
         }
       });
    

Has anybody any idea what could be wrong? Wild guesses are welcome…

UPDATE
I checked the jenkins.jnlp file and it contains “all-permissons” so it should be able to access the file system.

<security>
   <all-permissions/>
</security>

UPDATE 2
To make that clear: I run Selenium tests using Jenkins. Selenium remote controls Firefox and while doing so, PDF files are downloaded. The problem is, the Java process, e.g. my test classes can’t find the files.

  • 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-07T12:42:25+00:00Added an answer on June 7, 2026 at 12:42 pm

    Changing my relative path:

    new File("downloads/");
    

    to an absolute by calling "getAbsoluteFile" or just use "C:…":

    new File("downloads/").getAbsoluteFile();
    

    fixes the problem (but I don’t understand why). This is, because Jenkins sets the user.id and because of bugs in the java.io.File implementation this can cause problems. See this other SO question and this Java bug report.

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

Sidebar

Related Questions

I've just started with Jenkins and I'm just trying to use it to execute
I have started to use jenkins to build my project. I build my project
I am using Jenkins with tomcat. I use jenkins cli from java class to
I am using Jenkins with tomcat. I use jenkins cli from java class to
I use Jenkins to run some integration tests on a web appilcation (using cucumber,
I'm just getting started using GitHub, Gerrit, and Hudson(Jenkins) together. And I need some
I'm barely started to use Jenkins and this is the first problem I've had
use LWP::Simple; use Parallel::ForkManager; @links=( [http://prdownloads.sourceforge.net/sweethome3d/SweetHome3D-2.1-windows.exe,SweetHome3D-2.1-windows.exe], [http://prdownloads.sourceforge.net/sweethome3d/SweetHome3D-2.1-macosx.dmg,SweetHome3D-2.1-macosx.dmg], [http://prdownloads.sourceforge.net/sweethome3d/SweetHome3DViewer-2.1.zip,SweetHome3DViewer-2.1.zip], ); # Max 30 processes for
use Service layer to persist data into database. But the Unit Test does not
I'm using Jenkins and have the Archive the Artifacts step at the end of

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.