-
Notifications
You must be signed in to change notification settings - Fork 26
APPIUM SETUP FOR JAVASCRIPT
Install Node v16
not the latest version Node v17 as that is not compatible as of now with WebdriverIO & Appium.
Install Java and set environmental path (JAVA_HOME) in system
Download Android Studio and set sdk environmental path (Android_Home) in system
The Android Emulator simulates Android devices on your computer so that you can test your application on a variety of devices and Android API levels without needing to have each physical device. Android emulator
A GUI inspector for mobile apps and more, powered by a (separately installed) Appium server.its desired capabilities.
A GUI inspector for mobile apps and more, powered by a (separately installed) Appium server. When you're using it to inspect a mobile app, it looks like this:
Appium Inspector is basically just an Appium client (like WebdriverIO, Appium's Java client, Appium's Python client, etc...) with a user interface. There's an interface for specifying which Appium server to use, which capabilities to set, and then interacting with elements and other Appium commands once you've started a session.
install version 2.0 and above run command
npm install -g appium@next
Now to verify if its dependencies installed, you can run => npm install -g appium-doctor & appium-doctor
appium driver install uiautomator2
Now to verify if its been installed, you can run => appium driver list
after setup you can start the appium server and start inspect element of the app
simply run this command => appium -p 4724
go to project directory and run commands
-
initialize directory command --> npm init
after run this command he is asking for some info like you can follow this doc
package name (make it default by press enter key)
version (make it default by press enter key)
description (what ever you want to give)
entry point (make it default index.js by press enter)
test command (make it default by press enter key)
git repository (give repository link if any there)
keyword (you can give webdriverIO, appium)
author (you can give your name)
licence (make it default by press enter key)
-
install webdriverIO CLI
command -->npm install @wdio/cli
-
setup config command --> npx wdio config
after run this command he is asking for some info like you can follow this doc
? Where is your automation backend located? On my local machine
? Which framework do you want to use? mocha
? Do you want to use a compiler? No!
? Where are your test specs located? ./test/specs//*.js**
? Do you want WebdriverIO to autogenerate some test files? No
? Which reporter do you want to use? spec
? Do you want to add a plugin to your test setup?
? Do you want to add a service to your test setup? appium
? What is the base url? http://localhost
? Do you want me to run npm install
(Y/n) y
update wdio.conf.js file
you can follow this wdio.conf.js link
now setup is completed
go to terminal and run command
npx wdio
By this command app is installed on your device and it will run the test
if getting version issue update by below command
npm i [email protected] && npm i @wdio/[email protected]