Rectangle 27 18

Do not install nodejs through apt-get, which will need sudo rights and appium will not work if node is installed as sudo user. If you have already installed remove it using

sudo apt-get remove nodejs
sudo apt-get remove npm
tar -xvf <downloaded_binary_tar.gz>
export PATH=$PATH:<full_path_of_the_extracted_node_folder>/bin

Open a now terminal and do

npm install -g appium
appium

How to setup Appium in Ubuntu for android - Stack Overflow

android ubuntu appium
Rectangle 27 17

Do not install nodejs through apt-get, which will need sudo rights and appium will not work if node is installed as sudo user. If you have already installed remove it using

sudo apt-get remove nodejs
sudo apt-get remove npm
tar -xvf <downloaded_binary_tar.gz>
export PATH=$PATH:<full_path_of_the_extracted_node_folder>/bin

Open a now terminal and do

npm install -g appium
appium

How to setup Appium in Ubuntu for android - Stack Overflow

android ubuntu appium
Rectangle 27 15

I'm sure you will find plenty of tutorials on this (and this will only work for android since you would need an OSX box to do iOS) but here is what we did:

npm install -g grunt-cli

If you run into an issue about it not being able to install in a directory, do this.

npm install -g appium

Set up a symlink in your .bashrc file for Appium:

ln -s /path/to/appium.js /usr/bin/appium

Test to make sure it can run by running appium in your terminal. The output should be something like:

info: Welcome to Appium v0.16.0 (REV 292d265edd9c7aaf96f165009285c814b218363d)
info: Appium REST http interface listener started on 0.0.0.0:4723
   info  - socket.io started
sudo apt-get install openjdk-6-jre

Launch the Android SDK Manager:

~/path/to/android-sdk/tools/android

Install the packages that you'll need in the new window:

You can also create a symlink for the Android SDK Manager by doing:

ln -s /path/to/android-sdk/tools/android /usr/bin/android

This approach won't work. Appium won't run if node/npm are install as a privileged (sudo) user. Use Homebrew for Linux to install it instead as mentioned in one of the answers.

apk

How to setup Appium in Ubuntu for android - Stack Overflow

android ubuntu appium
Rectangle 27 15

I'm sure you will find plenty of tutorials on this (and this will only work for android since you would need an OSX box to do iOS) but here is what we did:

npm install -g grunt-cli

If you run into an issue about it not being able to install in a directory, do this.

npm install -g appium

Set up a symlink in your .bashrc file for Appium:

ln -s /path/to/appium.js /usr/bin/appium

Test to make sure it can run by running appium in your terminal. The output should be something like:

info: Welcome to Appium v0.16.0 (REV 292d265edd9c7aaf96f165009285c814b218363d)
info: Appium REST http interface listener started on 0.0.0.0:4723
   info  - socket.io started
sudo apt-get install openjdk-6-jre

Launch the Android SDK Manager:

~/path/to/android-sdk/tools/android

Install the packages that you'll need in the new window:

You can also create a symlink for the Android SDK Manager by doing:

ln -s /path/to/android-sdk/tools/android /usr/bin/android

This approach won't work. Appium won't run if node/npm are install as a privileged (sudo) user. Use Homebrew for Linux to install it instead as mentioned in one of the answers.

apk

How to setup Appium in Ubuntu for android - Stack Overflow

android ubuntu appium
Rectangle 27 6

Install ruby: Paste the below command at terminal and hit 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 below command at terminal and hit enter

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

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

export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
brew update
brew install node
brew link node
npm install -g appium


npm install wd
appium

I'm using Appium version 1.5.1 in Mac OS. I want to change appium configuration when it is installed by npm command (npm install -g appium) Is there a way to change it like changing the device name, command timeout, platform version ... Thanks.

you can specify device name , platform etc in your script itself desired_caps['platformName'] = 'Android' desired_caps['platformVersion'] = '4.4.4' desired_caps['deviceName'] = '9e3484f6'

@krishnachetan, I am trying to install appium using above instructions, it went well till "brew install node", only error I got is "Error: Failed to download resource "python"", Now I am trying to run "brew link node" on terminal but I am getting error "Error: No such keg: /home/sonal/.linuxbrew/Cellar/node". Can you please help?

How to setup Appium in Ubuntu for android - Stack Overflow

android ubuntu appium
Rectangle 27 6

Install ruby: Paste the below command at terminal and hit 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 below command at terminal and hit enter

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

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

export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
brew update
brew install node
brew link node
npm install -g appium


npm install wd
appium

I'm using Appium version 1.5.1 in Mac OS. I want to change appium configuration when it is installed by npm command (npm install -g appium) Is there a way to change it like changing the device name, command timeout, platform version ... Thanks.

you can specify device name , platform etc in your script itself desired_caps['platformName'] = 'Android' desired_caps['platformVersion'] = '4.4.4' desired_caps['deviceName'] = '9e3484f6'

@krishnachetan, I am trying to install appium using above instructions, it went well till "brew install node", only error I got is "Error: Failed to download resource "python"", Now I am trying to run "brew link node" on terminal but I am getting error "Error: No such keg: /home/sonal/.linuxbrew/Cellar/node". Can you please help?

How to setup Appium in Ubuntu for android - Stack Overflow

android ubuntu appium
Rectangle 27 3

Just to save somebodies time: on my Ubuntu 14.04 I was trying to install npm both via sudo apt-get and using binaries. Both approaches were wrong but everything is Ok after I istalled npm via HomeBrew

How to setup Appium in Ubuntu for android - Stack Overflow

android ubuntu appium
Rectangle 27 3

Now use the following commands from the terminal

make sure to start a new terminal

brew update
brew install node
brew link node
npm install -g appium@version

Hope this helps those who face the issue installing with "sudo"

How to setup Appium in Ubuntu for android - Stack Overflow

android ubuntu appium
Rectangle 27 3

Now use the following commands from the terminal

make sure to start a new terminal

brew update
brew install node
brew link node
npm install -g appium@version

Hope this helps those who face the issue installing with "sudo"

How to setup Appium in Ubuntu for android - Stack Overflow

android ubuntu appium
Rectangle 27 3

Just to save somebodies time: on my Ubuntu 14.04 I was trying to install npm both via sudo apt-get and using binaries. Both approaches were wrong but everything is Ok after I istalled npm via HomeBrew

How to setup Appium in Ubuntu for android - Stack Overflow

android ubuntu appium
Rectangle 27 1

To install node.js and appium without sudo we use linuxbrew.

  • To install linuxbrew these are the dependencies Ruby 1.8.6 or newer GCC 4.2 or newer Git 1.7.12.4 or newer Linux 2.6.16 or newer 64-bit x86 or 32-bit ARM platform
sudo apt-get install build-essential curl git m4 python-setuptools ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev
ruby -e $(curl -fsSL 
https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
sudo gedit.bashrc
.bashrc file.export
PATH="$HOME/.linuxbrew/bin:$PATH"exportMANPATH="$HOME/.linuxbrew/share/man:$MANPATH"export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"

7 .Install Node:Open new terminal and copy the command and press enter

brew update
brew install node
brew link node
npm install -g appium

9.Let's Check if the installation is successfull. Open the terminal and type "appium" and hit enter.You should see something like this in the terminal

info: Welcome to Appium v1.4.12(REV 8db2d00b9afcf2c50a09a80a2e8d56b05a902caf)
 info: Appium REST http interface listener started on 0.0.0.0:4723
 info: Console LogLevel: debug

How to setup Appium in Ubuntu for android - Stack Overflow

android ubuntu appium
Rectangle 27 1

It is very simple and easy, Please check the below steps!.

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
npm install -g appium
sudo npm install -g appium

More information please check official documentation :

How to setup Appium in Ubuntu for android - Stack Overflow

android ubuntu appium
Rectangle 27 1

To install node.js and appium without sudo we use linuxbrew.

  • To install linuxbrew these are the dependencies Ruby 1.8.6 or newer GCC 4.2 or newer Git 1.7.12.4 or newer Linux 2.6.16 or newer 64-bit x86 or 32-bit ARM platform
sudo apt-get install build-essential curl git m4 python-setuptools ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev
ruby -e $(curl -fsSL 
https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
sudo gedit.bashrc
.bashrc file.export
PATH="$HOME/.linuxbrew/bin:$PATH"exportMANPATH="$HOME/.linuxbrew/share/man:$MANPATH"export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"

7 .Install Node:Open new terminal and copy the command and press enter

brew update
brew install node
brew link node
npm install -g appium

9.Let's Check if the installation is successfull. Open the terminal and type "appium" and hit enter.You should see something like this in the terminal

info: Welcome to Appium v1.4.12(REV 8db2d00b9afcf2c50a09a80a2e8d56b05a902caf)
 info: Appium REST http interface listener started on 0.0.0.0:4723
 info: Console LogLevel: debug

How to setup Appium in Ubuntu for android - Stack Overflow

android ubuntu appium
Rectangle 27 1

It is very simple and easy, Please check the below steps!.

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
npm install -g appium
sudo npm install -g appium

More information please check official documentation :

How to setup Appium in Ubuntu for android - Stack Overflow

android ubuntu appium
Rectangle 27 5

appium & launches the appium server. Think of this as the equivalent of java -jar selenium.jar which would launch the Selenium RC server.

Once the server is launched you must connect to it via the python bindings:

from selenium import webdriver

desired_caps = {}
desired_caps['device'] = 'Android'
desired_caps['browserName'] = ''
desired_caps['version'] = '4.2'
desired_caps['app'] = '/path/to.your.apk'
desired_caps['app-package'] = 'com.example.android.package'
desired_caps['app-activity'] = 'YourActivity'
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)

Once you've connected you can control the test via normal python webdriver commands.

python - How to do Android Unit Test using Appium in Ubuntu - Stack Ov...

android python unit-testing ubuntu-12.04 appium
Rectangle 27 1

According to source, the constructor that you are using, should be the remote ip of the endpoint to test.

public RemoteWebDriver(URL remoteAddress ...

Could you try changing your 0.0.0.0 uri to a valid IP / host of the device to test?

If this is not the issue, I am seeing the error

protocol handshake makes me think that your sever may also be listening to https requests, while you are trying to establish the connection via http?

http
https

Still not working : 'org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end FAILED CONFIGURATION: @BeforeClass setUp org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. System info: host: 'tarek-Vostro-3902', ip: '127.0.1.1', os.name: 'Linux', Driver info: driver.version: RemoteWebDriver'

If still no avail, can you try adding -vv to the end of the appium execution line for a more verbose debugging output?

still not working, -vv print the version of appium only then it breaks

automated tests - Unable to run appium in ubuntu for an Android projec...

android automated-tests appium
Rectangle 27 10

basically we need inspector for viewing name, id and other property of element in the android app, which I can use for test automation with appium.

We can use "Ui Automator Viewer" which we can find in android sdk folder "sdk/tools/uiautomatorviewer".

is there a ubuntu appium inspector for android - Stack Overflow

ubuntu appium
Rectangle 27 2

In order to run the Appium iOS test , we need to some xcode to be installed on machine. I don't think so you can install xcode in Ubuntu.

Appium use xcode uiautomator to run the test in real device / simulator.

Still you want to run appium iOS test Ubuntu, you may ended with extra work like install VM and install MAC os in that VM so on.

ah ok, just i'm asking to know if there is a possible way without Mac.

@Manidroid.....how can i perform iOS App Testing with appium.,...thanks in advance

Can i use Appium to test IOS and Android on Ubuntu? - Stack Overflow

android ios automated-tests appium appium-ios
Rectangle 27 2

If you have already installed android sdk and configured path skip step 1 and go to step 2 directly.

Step1: Download SDK for linux. Extract to home folder in linux

Then configure your sdk path in .bashrc file

Opens an text editor, type the folowing and save

export ANDROID_HOME="$HOME/adt/sdk"

  export JAVA_HOME="/usr/bin/java"

  export PATH=${PATH}:~/adt/sdk/tools

  export PATH=${PATH}:~/adt/sdk/platform-tools

Step2: Then type uiautomatorviewer at your terminal to start uiautomatorviewer and get details of elements you want to inspect.

is there a ubuntu appium inspector for android - Stack Overflow

ubuntu appium
Rectangle 27 0

I've installed the NVM on CentOS 7 and it works perfectly.

curl https://raw.githubusercontent.com/creationix/nvm/v0.13.1/install.sh | bash

I will strongly recommend going for that with which you will have control of NodeJS versions.

Linuxbrew

How to setup Appium in Ubuntu for android - Stack Overflow

android ubuntu appium