Search code examples
teamcityrobotframeworkgeckodriver

TeamCity doesn't see geckodriver path


I got my set of robot framework tests, that works correctly on my localhost.

The geckodriver is located in project folder as

Project_name/webdrivers/geckodriver.exe

Then I have this keyword set as Test Setup:

Set Environment Variable  webdriver.gecko.driver  Project_name/webdrivers/geckodriver.exe

This however doesn't work when run tests via Team City, and I got this message:

WebDriverException: Message: 'geckodriver' executable needs to be in PATH


Solution

  • This should be easily solved by a google search for "add program to path"

    export PATH=$PATH:/path/to/geckodriver


    You can expand the path for a build agent by adding a build parameter named "env.PATH" with the following value on Mac OS and Linux.

    %env.PATH%:/my/path
    

    On Windows use ";" instead of ":" as the path delimiter.

    You can also add the following to conf/buildAgent.properties in your build agent installation directory.

    env.PATH=%env.PATH%:/my/path