0

I have created 3 Test Server, IE, Chrome and Firefox. In TeamCity i created 3 build configuration IE, Chrome and Firefox. I have 3 Agents AgentIE, AgentChrome and AgentFirefox.

Each agent is assign to specific build configuration example Build Configuration IE is to AgentIE

When i run the Build Configuration Firefox, all tests gets executed but when i run the Build Configuration IE and Chrome tests do not get executed . Error message indicate that the IE and Chrome exe do not exist but i followed the exe file exist in the directory and in a directory on the PATH environment variable.

MSTest]

Framework.FeatureFiles.AdditionalFieldsFeature.CreateNewAdditionalField_0001 (Create New Additional Field: 0001)

[10:35:53][Framework.FeatureFiles.AdditionalFieldsFeature.CreateNewAdditionalField_0001 (Create New Additional Field: 0001)] Assembly Initialization method Framework.BaseClasses.Base.InitWebdriver threw exception. OpenQA.Selenium.DriverServiceNotFoundException: OpenQA.Selenium.DriverServiceNotFoundException: The chromedriver.exe file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at http://chromedriver.storage.googleapis.com/index.html.. Aborting test execution.

[10:35:53][Framework.FeatureFiles.AdditionalFieldsFeature.CreateNewAdditionalField_0001 (Create New Additional Field: 0001)] at OpenQA.Selenium.DriverService.FindDriverServiceExecutable(String executableName, Uri downloadUrl)
at OpenQA.Selenium.Chrome.ChromeDriverService.CreateDefaultService()
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)
at Framework.BaseClasses.Base.GetChromeDriver() in C:\TeamCity\buildAgent\work\eba5cd3c0056fc6a\Framework\BaseClasses\Base.cs:line 61
at Framework.BaseClasses.Base.InitWebdriver(TestContext tc) in C:\TeamCity\buildAgent\work\eba5cd3c0056fc6a\Framework\BaseClasses\Base.cs:line 84

If i run the Chrome build configuration on a agent that is running on the teamcity server, the test gets executed.

Ahmed Yaslem
  • 123
  • 1
  • 2
  • 19

2 Answers2

1

I had the exact same issue and I was able to resolve it by doing the following steps:

  • You need to download the chromedriver.exe for your machine type.
  • Then put the folder where you save the chromedriver.exe in the Path variable of the TeamCity server.
  • Next you need to restart the TeamCity server.

You can download the latest Chrome Driver here.

Here are some instructions on how to add variable to the path.

Adil B
  • 9,911
  • 10
  • 41
  • 55
BHOW
  • 129
  • 3
  • From the message, it was clear that I needed to add to the PATH, but restarting the TeamCity server was the key step that I was missing. – Fabio S. Sep 28 '18 at 06:36
0

Issue was with the path variable on the specific machine.

Ahmed Yaslem
  • 123
  • 1
  • 2
  • 19