Reputation: 113
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.
Upvotes: 0
Views: 2487
Reputation: 304
I had the exact same issue and I was able to resolve it by doing the following steps:
You can download the latest Chrome Driver here.
Here are some instructions on how to add variable to the path.
Upvotes: 1