ANDROID_HOME
as well as relying onvarious binaries in your PATH
and so on. When running from the command linein an environment where you have set these variables appropriately, Appium hasno problem in picking them up. However, Appium Desktop does not run in a shellor a command-line environment, and so by default it does not have access toenvironment variables you have set in your shell startup script or profile. Towork around this, we use theshell-env package to pick upenvironment variables defined in your shell. This package only looks in certaincommon init scripts, however, like ~/.bashrc
, ~/.bash_profile
, and~/.zshrc
. If you set your Appium environment variables in some other way, youwill need to create one of these default init scripts and set your environmentvariables there as well, so that Appium Desktop will successfully pick them up..dmg
file). This is not a supported mode of running Appium Desktop. Tocorrectly install Appium Desktop, copy the application from the disk image toyour local filesystem, to somewhere like /Applications
. Then, run the appfrom that new location.npm install
, hack with Appium, or contributeto Appium, you will need Node.js and NPM (usenvm,n, or brew install node
to installNode.js. Make sure you have not installed Node or Appium with sudo
, otherwiseyou'll run into problems). We recommend the latest stable version, thoughAppium supports Node 10+.appium-doctor
. Install it with npm install -g appium-doctor
, then run theappium-doctor
command, supplying the --ios
or --android
flags to verifythat all of the dependencies are set up correctly.4723
). Thisport information is vital since you will have to direct your test client tomake sure to connect to Appium on this port. If you want to change, the port,you can do so by using the -p
flag when starting Appium (be sure to check outthe full list of serverparameters).webdriverio
:index.js
, and initialize theclient object:wdio.remote()
with them. Desired Capabilities are just a set of keys andvalues that get sent to the Appium server during session initialization, thattell Appium what kind of thing we want to automate. The minimum set of requiredcapabilities for any Appium driver should include:platformName
: the name of the platform to automateplatformVersion
: the version of the platform to automatedeviceName
: the kind of device to automateapp
: the path to the app you want to automate (but use the browserName
capability instead in the case of automating a web browser)automationName
: the name of the driver you wish to usewebdriverio
and now have a client object which will represent theconnection to the Appium server. From here, we can go ahead and start thesession, perform some test commands, and end the session. In our case, we willsimply type into a text field and check that the correct text was entered:node
: