Documentation

Looking for something in particular?

Customize Browser Driver Location

Last Modified:

Provar allows the customization of browser driver location for Chrome, Firefox, and Edge. When a custom driver location is specified, it takes precedence over the default settings, with the specified path logged for transparency.

Users-Defined paths will take priority over other defined values. 

Driver Location Priority (Order of Resolution):

  1. User-Defined Path
    • Custom path explicitly provided by the user (via environment variables, configuration files, or command-line arguments)
  2. Test Project’s lib Folder
    • The folder within the test project directory where the driver is located
  3. User Home Directory
    • .chromeDriver folder inside the {UserHome}/Provar directory, where the driver is auto-downloaded
  4. Default Installer Driver
    • The driver is bundled with the Provar installation or a system-wide default driver

To define the custom path for drivers in Provar, the following options are available:

  1. Create an Environment Variable
  2. Edit the provar.properties File
  3. Edit the provar.ini File
  4. Pass as a Command-Line Argument

Note: The path value should specify the parent directory where the driver executable is located.

Create an Environment Variable

Create an Environment Variable by visiting the Variable tab in your Test Settings window. Click the plus sign in the top right corner to add a new variable.

 Complete the Variable Name and Default Value fields to create the overriding path value.

The Variable Name is dependent on the browser.

BrowserEnvironment Variable Name
ChromePROVAR_CHROMEDRIVER_PATH
EdgePROVAR_MSEDGEDRIVER_PATH
FirefoxPROVAR_GECKODRIVER_PATH

The Default Value should point to the user-defined, custom location.

In the example below, the Chrome driver is being directed to a folder in the Windows downloads directory. 

Click OK to save your changes. You should see the variable listed as a way to confirm the entry.  Double click the line item or select a entry and click the second edit icon to make changes.

Edit the provar.properties File

During the initial launch of Provar Automation, a .properties folder is created in the Provar UserHome with a blank provar.properties file inside. For windows, that can be found at C:\Users\<username>\Provar.  For Mac, this is C:/Users/<username>/Provar.

Read about more feature flags and property configuration that can be set in this file.

To set a custom location for your driver in the provar.properties file, open the file in your favorite editor.
Create a new line in the file that begins with a variable for the corresponding browser you’d like to edit.

BrowserFile Entry
Chromecom.provar.chromedriver.path
Edgecom.provar.msedgedriver.path
Firefoxcom.provar.geckodriver.path

Set the variable equal to your chosen location. 

As before, in the example below, the Chrome driver is being directed to a folder in the Windows downloads directory. 

Read about more feature flags and property configuration that can be set in this file.

Edit the provar.ini File

The provar.ini file can be directly edited to customize the driver locations by going to the Provar installation directory. 

By default this is C:\ProgramFiles\Provar for Windows machines.

To find this folder for Mac, go to Provar in Applications. Right-click on the Provar application and choose Show Package Contents. Open Contents > Eclipse to locate the provar.ini file.

Read more about adding edit permissions to the provar.ini file.

Add the custom driver path entries in the provar.ini file by setting the supported property equal to the driver directory. 

BrowserFile Entry
Chrome-Dcom.provar.chromedriver.path
Edge-Dcom.provar.msedgedriver.path
Firefox-Dcom.provar.geckodriver.path

Make sure to save changes to the file. 

Pass as a Command Line Argument

Users may also include the custom driver path properties as command-line arguments while running through Apache Ant. As part of the ant command for the build.xml file, use the appropriate property to specify the customized location for your driver.                                                                      

BrowserCommand Line Argument
Chrome-Dcom.provar.chromedriver.path
Edge-Dcom.provar.msedgedriver.path
Firefox-Dcom.provar.geckodriver.path

In the example below, the ant build.xml file is being run with the Firefox driver location argument directing the location to C:\Users\avalo\Downloads\geckodriver-v0.35.0-win-aarch64.

Discover more about running your tests under Apache Ant.


Feedback

Was this article helpful for you?
Documentation library

Trying to raise a case with our support team?

We use cookies to better understand how our website is used so we can tailor content for you. For more information about the different cookies we use please take a look at our Privacy Policy.

Scroll to Top