@Override public String call() throws Exception { TemporaryFilesystem tempfs = getSession().getTemporaryFileSystem(); File tempDir = tempfs.createTempDir("upload", "file"); new Zip().unzip(file, tempDir); // Select the first file File[] allFiles = tempDir.listFiles(); if (allFiles == null || allFiles.length != 1) { throw new WebDriverException("Expected there to be only 1 file. There were: " + allFiles.length); } return allFiles[0].getAbsolutePath(); }