Reputation: 31
Appium 1.4.16 or any 1.4.x version works fine. We used Appium Version Manager (avm) to upgrade to new versions, but with 1.5.x onwards does not seem to be working.
I am currently on Appium 1.4.16 and would want to upgrade to Appium 1.6.3 (current latest). Can we do that?
Note - the reason we need avm is to switch between appium versions, which i feel is good to have. Helps us specially when we are in the process of upgrading our suite to cater the changes in 1.6.x, so that until we finish, we can still use an older (stable) version
Upvotes: 0
Views: 7131
Reputation: 31
Phew... after some searching, testing and playing around, found a way.
When Appium releases a newer version or a beta, I feel its an advantage to keep an older (stable) version and switch between Appium versions. Because in my experience, a newer Appium version could break some existing automation tests, so until we fix them separately, having an older version helps in executing those tests without errors.
Plus switching versions without every time needing to install / uninstall is advantageous while testing out a beta.
AVM was (rather is) a great utility that allows this switching between versions, but somehow it had stopped working after Appium1.5.0. So here are the steps to use AVM to install Appium after version 1.5.0 and keep switching between as many instances of Appium.
At the moment, Appium1.6.4 is the official release, so I'll highlight the steps with that version.
(Also, I use a Mac but think installing it on Windows should be similar).
Pre requisite --> install 'brew' and 'node'.
If it shows list of commands, then congrats, avm is installed !!!
Now since AVM is not maintained since Appium1.5.0, we need to install a version < 1.5.0. Let us do with 1.4.16
ln -s $dir/node_modules/appium/bin/appium.js $AVM_PREFIX/bin/appium
replace with
ln -s $dir/node_modules/appium/build/lib/main.js $AVM_PREFIX/bin/appium
sample screenshot to edit 'activate ()' method
local bin=$VERSIONS_DIR/$version/node_modules/appium/bin/appium.js
replace with
local bin=$VERSIONS_DIR/$version/node_modules/appium/build/lib/main.js
note - i'll post a reference link that mentioned about this change being made to 'avm' file.
and this is our final act !!! :)
More information on singing profiles for WDA in a nice detail manner here --> https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md note - while executing tests on real devices, if you get an Error 65, means the WebDriverAgent has not been signed properly.
Once installed, for any Future versions of Appium, only Part C is required, no need of Part A and Part B if you've got avm
Upvotes: 2
Reputation: 976
Below is the command to install and upgrade specific version of appium.
Installation : SYNTAX : npm install -g appium@versionNumber
e.g. : npm install -g [email protected]
Upgrade : SYNTAX : npm update -g appium@versionNumber
e.g. : npm update -g [email protected]
Upvotes: 0