Jenkins Freestyle Unable to Run a selenium script that clicks a link to Download a file

I have a selenium script that tries to download a chromedriver from this site (https://chromedriver.storage.googleapis.com/index.html?path=97.0.4692.71/). This script runs outside of Jenkins (on our servers) and downloads the file “chromedriver_win32.zip” but does not download “chromedriver_win32.zip” when we run it from a Jenkins job.

Details of environment:
Jenkins 2.263.4
Java version - 8u301
Windows Server 2016
JavaScript GUI Lib: ACE Editor bundle plugin (ace-editor): 1.1
Active Directory plugin (active-directory): 2.16.1
Adaptive Disconnector Plugin (adaptive-disconnector): 0.2
Ant Plugin (ant): 1.11
OWASP Markup Formatter Plugin (antisamy-markup-formatter): 2.0
Apache HttpComponents Client 4.x API Plugin (apache-httpcomponents-client-4-api): 4.5.10-2.0
Artifact Deployer Plug-in (artifactdeployer): 1.2
Artifactory Plugin (artifactory): 3.13.2
Audit Trail (audit-trail): 3.8
Authentication Tokens API Plugin (authentication-tokens): 1.3
Authorize Project (authorize-project): 1.3.0
Bootstrap 4 API Plugin (bootstrap4-api): 4.6.0-1
bouncycastle API Plugin (bouncycastle-api): 2.18
Branch API Plugin (branch-api): 2.5.5
Build Failure Analyzer (build-failure-analyzer): 2.0.0
Build Timeout (build-timeout): 1.19.1
Build Timestamp Plugin (build-timestamp): 1.0.3
user build vars plugin (build-user-vars-plugin): 1.5
Folders Plugin (cloudbees-folder): 6.16
Command Agent Launcher Plugin (command-launcher): 1.4
Conditional BuildStep (conditional-buildstep): 1.3.6
Config File Provider Plugin (config-file-provider): 3.8.0
Configuration Slicing plugin (configurationslicing): 1.52
Credentials Binding Plugin (credentials-binding): 1.24
Credentials Plugin (credentials): 2.5
Custom View Tabs Plugin (custom-view-tabs): 1.3
Declarative Pipeline Migration Assistant API (declarative-pipeline-migration-assistant-api): 1.5.1
Display URL API (display-url-api): 2.3.2
Docker Commons Plugin (docker-commons): 1.16
Docker Pipeline (docker-workflow): 1.23
DotNet as Script (dotnet-as-script): 1.0.2
Downstream-Ext (downstream-ext): 1.8
Durable Task Plugin (durable-task): 1.34
ECharts API Plugin (echarts-api): 4.9.0-3
Embeddable Build Status Plugin (embeddable-build-status): 2.0.3
EnvInject API Plugin (envinject-api): 1.7
Environment Injector Plugin (envinject): 2.3.0
External Monitor Job Type Plugin (external-monitor-job): 1.7
Font Awesome API Plugin (font-awesome-api): 5.15.2-1
Git client plugin (git-client): 3.2.1
GIT server Plugin (git-server): 1.9
Git plugin (git): 4.2.2
GitHub API Plugin (github-api): 1.110
GitHub Branch Source Plugin (github-branch-source): 2.6.0
GitHub plugin (github): 1.29.5
Gradle Plugin (gradle): 1.36
Green Balls (greenballs): 1.15
JavaScript GUI Lib: Handlebars bundle plugin (handlebars): 1.1.1
Hashicorp Vault Pipeline Plugin (hashicorp-vault-pipeline): 1.3
HashiCorp Vault Plugin (hashicorp-vault-plugin): 3.8.0
Micro Focus Application Automation Tools (hp-application-automation-tools-plugin): 7.2
Ivy Plugin (ivy): 2.1
Jackson 2 API Plugin (jackson2-api): 2.11.1
Javadoc Plugin (javadoc): 1.5
Oracle Java SE Development Kit Installer Plugin (jdk-tool): 1.4
Jobcopy Builder plugin (jobcopy-builder): 1.4.0
Job/Queue/Slaves Monitoring Plugin (jqs-monitoring): 1.4
JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin (jquery-detached): 1.2.1
jQuery plugin (jquery): 1.12.4-1
JQuery3 API Plugin (jquery3-api): 3.5.1-2
JSch dependency plugin (jsch): 0.1.55.2
JUnit Plugin (junit): 1.37
LDAP Plugin (ldap): 1.22
Least Load plugin (leastload): 2.0.1
Lockable Resources plugin (lockable-resources): 2.10
Log Parser Plugin (log-parser): 2.1
Mailer Plugin (mailer): 1.32.1
MapDB API Plugin (mapdb-api): 1.0.9.0
Matrix Authorization Strategy Plugin (matrix-auth): 2.6.5
Matrix Project Plugin (matrix-project): 1.18
Maven Integration plugin (maven-plugin): 3.6
Metrics Plugin (metrics): 4.0.2.6
JavaScript GUI Lib: Moment.js bundle plugin (momentjs): 1.1.1
Monitoring (monitoring): 1.87.0
MSBuild Plugin (msbuild): 1.29
Nested View Plugin (nested-view): 1.17
Node and Label parameter plugin (nodelabelparameter): 1.7.2
PAM Authentication plugin (pam-auth): 1.6
Parameterized Remote Trigger Plugin (Parameterized-Remote-Trigger): 3.1.5.1
Parameterized Scheduler (parameterized-scheduler): 0.8
Parameterized Trigger plugin (parameterized-trigger): 2.36
Pipeline: Build Step (pipeline-build-step): 2.12
Pipeline: GitHub Groovy Libraries (pipeline-github-lib): 1.0
Pipeline Graph Analysis Plugin (pipeline-graph-analysis): 1.10
Pipeline: Input Step (pipeline-input-step): 2.11
Pipeline: Milestone Step (pipeline-milestone-step): 1.3.1
Pipeline: Model API (pipeline-model-api): 1.6.0
Pipeline: Declarative Agent API (pipeline-model-declarative-agent): 1.1.1
Pipeline: Declarative (pipeline-model-definition): 1.6.0
Pipeline: Declarative Extension Points API (pipeline-model-extensions): 1.6.0
Pipeline: REST API Plugin (pipeline-rest-api): 2.13
Pipeline: Stage Step (pipeline-stage-step): 2.3
Pipeline: Stage Tags Metadata (pipeline-stage-tags-metadata): 1.6.0
Pipeline: Stage View Plugin (pipeline-stage-view): 2.13
Pipeline Utility Steps (pipeline-utility-steps): 2.8.0
Plain Credentials Plugin (plain-credentials): 1.7
Plugin Usage - Plugin (plugin-usage-plugin): 1.2
Plugin Utilities API Plugin (plugin-util-api): 1.7.1
Popper.js API Plugin (popper-api): 1.16.1-1
PowerShell plugin (powershell): 1.4
Python Wrapper Plugin (python-wrapper): 1.0.3
Python Plugin (python): 1.3
Resource Disposer Plugin (resource-disposer): 0.14
Run Condition Plugin (run-condition): 1.3
SCM API Plugin (scm-api): 2.6.3
Scoring Load Balancer (scoring-load-balancer): 1.0.1
Script Security Plugin (script-security): 1.76
secondary timestamper plugin (secondary-timestamper-plugin): 1.1
Selenium Builder plugin (selenium-builder): 1.14
Selenium Plugin (selenium): 3.141.59
ShiningPanda Plugin (shiningpanda): 0.24
Simple Parameterized Builds Report Plugin (simple-parameterized-builds-report): 1.5
Simple Theme Plugin (simple-theme-plugin): 0.6
Slave SetupPlugin (slave-setup): 1.10
slave-status (slave-status): 1.6
Snakeyaml API Plugin (snakeyaml-api): 1.27.0
SSH Credentials Plugin (ssh-credentials): 1.18.1
SSH Build Agents plugin (ssh-slaves): 1.31.2
Strict Crumb Issuer Plugin (strict-crumb-issuer): 2.1.0
Structs Plugin (structs): 1.23
Support Core Plugin (support-core): 2.72.1
Slave Monitor for system load average (systemloadaverage-monitor): 1.2
Template Workflows (template-workflows): 1.2
ThinBackup (thinBackup): 1.9
Timestamper (timestamper): 1.11.2
Token Macro Plugin (token-macro): 2.12
Trilead API Plugin (trilead-api): 1.0.6
Variables Replace (variables-replace-plugin): 1.0.0
Variant Plugin (variant): 1.3
WMI Windows Agents Plugin (windows-slaves): 1.6
Pipeline (workflow-aggregator): 2.6
Pipeline: API (workflow-api): 2.40
Pipeline: Basic Steps (workflow-basic-steps): 2.19
Pipeline: Shared Groovy Libraries (workflow-cps-global-lib): 2.16
Pipeline: Groovy (workflow-cps): 2.80
Pipeline: Nodes and Processes (workflow-durable-task-step): 2.35
Pipeline: Job (workflow-job): 2.38
Pipeline: Multibranch (workflow-multibranch): 2.21
Pipeline: SCM Step (workflow-scm-step): 2.10
Pipeline: Step API (workflow-step-api): 2.23
Pipeline: Supporting APIs (workflow-support): 3.4
Workspace Cleanup Plugin (ws-cleanup): 0.38

Usually that means the network configuration on your Jenkins agent is different than the network configuration on your desktop. There are many ways those network configurations could be different. Things you might investigate include:

  • Can the agent download a file from an HTTP server inside your company?
  • Can the agent download a different file from an HTTP server outside your company?
  • Does the agent have a different anti-virus configuration than the working desktop?
  • Does the agent have a different network firewall configuration than the working desktop?
  • Does the agent have a different network routing configuration than the working desktop?
  • Can the agent download a file from an HTTP server inside your company? Yes
  • Can the agent download a different file from an HTTP server outside your company? Yes
  • Does the agent have a different anti-virus configuration than the working desktop? No
  • Does the agent have a different network firewall configuration than the working desktop? No
  • Does the agent have a different network routing configuration than the working desktop? No

I added this line in my script “addArguments(”–no-sandbox");" to my script to get the freestyle job to run from Jenkins. Are there any other arguments I should add to my script to see if it runs? Or are there other plugins I need when I use selenium?