Appium - Command Line

Team

Can you guide me or give me some guides to launch Appium through the command line? I see a lot of problems with Appium.app on MAC. It would be great if you could share your knowledge or materials for me to move forward to launch the sample application using appium via the command line. Please refer to my settings in appium.app for reference.

Appium - Unable to start inspector

Magazines:

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.2","revision":"cf6ff5939ddc6b4d45fcbabfbfe13c950e0058c4"}}} info: <-- GET /wd/hub/status 200 1.335 ms - 104 {"status":0,"value":{"build":{"version":"1.2.2","revision":"cf6ff5939ddc6b4d45fcbabfbfe13c950e0058c4"}}} info: --> GET /wd/hub/sessions {} info: [debug] Responding to client with success: {"status":0,"value":[]} info: <-- GET /wd/hub/sessions 200 2.145 ms - 23 {"status":0,"value":[]} info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"7.1","newCommandTimeout":"999999","automationName":"Appium","deviceName":"iPhone Simulator"}} info: [debug] Using local app from command line: /Users/rsangili/Desktop/temp/Payload/TestApp2.app info: [debug] Creating new appium session dd2c8121-6a13-48be-8a0b-9fc6233437a5 info: [debug] Removing any remaining instruments sockets info: [debug] Cleaned up instruments socket /tmp/instruments_sock info: [debug] Setting Xcode folder info: [debug] Setting Xcode version info: [debug] Setting iOS SDK Version info: [debug] iOS SDK Version set to 7.1 info: [debug] Detecting automation tracetemplate info: [debug] Not auto-detecting udid, running on sim error: Could not parse plist file (as binary) at /Users/rsangili/Desktop/temp/Payload/TestApp2.app/en.lproj/Localizable.strings info: Will try to parse the plist file as XML error: Could not parse plist file (as XML) at /Users/rsangili/Desktop/temp/Payload/TestApp2.app/en.lproj/Localizable.strings warn: Could not parse app Localizable.strings info: [debug] Not setting locale info: [debug] Creating instruments info: [debug] Preparing uiauto bootstrap info: [debug] Dynamic bootstrap dir: info: [debug] Dynamic env: info: [debug] Dynamic bootstrap code: info: [debug] Dynamic bootstrap path: info: [debug] Reusing dynamic bootstrap: info: [debug] Fixing device was changed from:" info: [debug] No iOS / app preferences to set info: [debug] Starting iOS 7.* simulator log capture info: [debug] Killing the simulator process info: [debug] Killing any other simulator daemons info: [debug] Checking whether instruments supports our device string info: [debug] Getting list of devices instruments supports info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments info: [debug] Fixing device was changed from:" info: [debug] Cleaning up appium session error: Failed to start an Appium session, err was: Error: Command failed: info: [debug] Error: Command failed: at ChildProcess.exithandler (child_process.js:648:15) at ChildProcess.emit (events.js:98:17) at maybeClose (child_process.js:756:16) at Process.ChildProcess._handle.onexit (child_process.js:823:5) info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Command failed: )","killed":true,"code":null,"signal":"SIGTERM","origValue":"Command failed: "},"sessionId":null} info: <-- POST /wd/hub/session 500 6381.780 ms - 199 

Thank you Ramesh

+2
appium
source share
2 answers

Using Appium from the command line

Installation

  • Open Terminal Session
  • Install homebrew ( instructions )
  • Run the following commands

  $ brew install node # install node and npm $ npm install -g appium # globally install appium $ npm install wd $ appium # Launch your appium server! 

Using

Whenever you want to start an application server session, enter appium to start the server.

Arguments can be added to this command.

appium --app path/to/app --device-name "iPhone Simulator"

Using Appium.app inspector with server

In my env setup for installation, I do not use the Appium.app server, but I DO use the inspector.

  • Launch your Appium server with the arguments --app and --device-name
  • Click the Appium.app Inspector Icon
  • The iPhone Initialist will start, and may give you an authorization request for tools to manage it.
+9
source share

Appium setup

 Mac: 

Download and install the latest Java from http://www.oracle.com/technetwork/java/javase/downloads/index.html Download and install the latest Android SDK from http://developer.android.com/sdk/index.html Set the path to ANDROID_HOME and JAVA_HOME in the .bash profile Set the path to the "Tools-tools and tools" folder in the .bash profile Set ruby

Install brew

  ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)" 

Set path for brew from .bash profile

  export PATH="$HOME/.linuxbrew/bin:$PATH" export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH" export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH" 

Install node: Paste the following commands one by one on the terminal and press enter

  brew update brew install node brew link node 

Install appium

  npm install -g appium npm install wd 

To launch appium: paste the command below into the terminal and press enter

  appium 

Install the Appium python client: Download the source code https://github.com/appium/python-client Extract it, go to the folder containing the Python client from the terminal and install: cd python-client

 python setup.py install 

IDE Used: Pycharm

 Linux: 

Download and install the latest Java from http://www.oracle.com/technetwork/java/javase/downloads/index.html Download and install the latest Android SDK from http://developer.android.com/sdk/index.html Configure the path to ANDROID_HOME and JAVA_HOME in the .bashrc profile Configure the path to the Tools-Tools and Tools folder in the .bashrc profile gedit.bashrc command open the bash profile and specify the path Install ruby ​​Install linux brew ruby ​​-e "$ (curl -fsSL https : //raw.githubusercontent.com/Homebrew/linuxbrew/go/install ) "

Steps for running appium on an ubuntu computer:

Install ruby: paste the following command on the terminal and press Enter

  sudo apt-get install build-essential curl git m4 ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev 

Install linux brew: Paste the command below into the terminal and press Enter. ruby -e "$ (curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install )"

set the path for brew

Type: gedit.bashrc in the terminal and paste the copy into the .bashrc file

  export PATH="$HOME/.linuxbrew/bin:$PATH" export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH" export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH" 

Install node: Paste the following commands one by one on the terminal and press enter

  brew update brew install node brew link node 

Install appium

  npm install -g appium npm install wd 

To launch appium: paste the command below into the terminal and press enter

  appium 

Install the Appium python client: Download the source code https://github.com/appium/python-client Extract it, go to the folder containing the Python client from the terminal and install: cd python-client

  python setup.py install 

Used IDE: Spyder / Pycharm You can get spyder by running the sudo apt-get install Spyder Windows command:

Download and install python 2.7.9 from https://www.python.org/downloads/ Download and install the latest Java from http://www.oracle.com/technetwork/java/javase/downloads/index.html Download the Android SDK from http://developer.android.com/sdk/index.html Set the environment variables JAVA_HOME for Java, Python.exe for python and ANDROID_HOME for Android sdk, as well as Android and platform tools.

IDE Used: Pycharm

Download and install the pycharm IDE from https://www.jetbrains.com/pycharm/ Installing the Appium python client: Download the source code https://github.com/appium/python-client Extract it, go to the folder containing the Python client, from the terminal and install: cd python-client

install python setup.py Start the node server using Appium gui with a Windows PC

+1
source share

All Articles