At webdriver-manager\selenium\update-config.json
for "last" and "all" JSON parameters, I have absolute paths. How I can set relative paths to them?
I tried "..\" and ".\" but it's not working. Any ideas?
At webdriver-manager\selenium\update-config.json
for "last" and "all" JSON parameters, I have absolute paths. How I can set relative paths to them?
I tried "..\" and ".\" but it's not working. Any ideas?
Alright, so this is the design of
update-config.json
, what it is used for and why it is there.Write update-config.json during update
When a user calls
webdriver-manager update
, the binaries are downloaded and renamed to include the version number. This allows a user to have multiple versions of a binary in their output directory. Previously around ~2015, the file would be downloaded and the uncompressed file for ChromeDriver name would just bechromedriver
(orchromedriver.exe
on Windows). Now, we rename to include the version. So if we downloaded version 2.28, the uncompressed file would bechromedriver_2.28
How this is used by Protractor
Previously (~2015), the driver provider for
local
anddirectConnect
would make assumptions on the filename. So for our previous example, it would assume that the file waschromedriver
(orchromedriver.exe
on Windows).There are a couple of issues with appending a version number:
So what happens is that we keep track of the "latest" version downloaded. The last version downloaded by webdriver-manager will be used by Protractor. The "all" field was just a list of versions downloaded. I believe when we call "status" these values are used.
Obviously, if you delete the
update-config.json
but still have the binaries, Protractor will not find theupdate-config.json
. Therefore it won't be able to runlocal
ordirectConnect
and will complain / ask to runwebdriver-manager update
.Why this should not be stored in git
Previous comments ask about storing this value. The idea here is that, just like the binaries and caching files, this file is temporary and should not be stored in git. I actually do not understand the use case where a user wants to have a relative path to the
update-config.json
but if you need to reference it via code then I would do something like lib/driverProviders/local.ts#L43.You can try to update it like this, it will definitely update it in node_modules/protractor