Recently I updated my protractor
, webdriver-manager
, chromedriver
, selenium-server
.
After that I faced this problem: formerly we shared one protractor application in github with chromedriver
and selenium-server
in it. So others in my project can use it directly after downloaded this git project.
We don't have seleniumAddress
and directConnect
in our protractor configuration file. It means we launched tests with local driver.
But now update-config.json
file was added to track chromedriver and selenium-server version and the paths in it were all absolute paths. We need to changed the paths after downloaded it.
So how can we use local driver without update-config.json
file?
There is a long explanation of how Protractor uses the
update-config.json
in this answer. The good news is you could avoid theupdate-config.json
if you want to. I'll provide both examples for thelocal
anddirectConnect
since these are similar:local without update-config.json
In
lib/driverProviders/local.ts
, theupdate-config.json
could be avoided if you provide the paths tochromeDriver
and theseleniumServerJar
in your config file. If Protractor cannot find them, it will throw aBrowserError
.So your configuration file would look something like:
directConnect without update-config.json
Similarly, if you provide the
chromeDriver
path when usingdirectConnect
in your config, you could avoid using theupdate-config.json
. The configuration file will look something like: