如何在Linux中安装并运行appium?

问题描述:

我想要做一个真实的Android设备中打开一个网址的UI自动化。为此,我想在我的linux系统上安装并运行appium,请指导我如何操作?也建议我反正在Chrome浏览器中使用eclipse打开一个URL?如何在Linux中安装并运行appium?

+0

遵循这一问题http://*.com/questions/22374416/how-to-setup- appium-in-ubuntu-for-android 它会帮助你亲爱的 – 2014-09-01 12:07:54

+0

这个问题有你需要的答案。它为我工作。 https://*.com/questions/22374416/how-to-setup-appium-in-ubuntu-for-android – DTNPerera 2017-08-08 10:03:57

我猜你需要在Linux上运行Appium的所有信息都在这个位置:

http://appium.io/slate/en/master/?ruby#running-appium-on-linux

如何运行你的测试

http://appium.io/slate/en/master/?ruby#running-tests

和一堆代码示例这里

https://github.com/appium/sample-code

如果您想在Chrome浏览器中运行测试,则需要Chromedriver,它已经集成在appium项目中。这里更多的信息:

https://sites.google.com/a/chromium.org/chromedriver/getting-started


安装Appium在Linux(Fedora的22)

$ sudo dnf update -y 
$ sudo dnf groupinstall -y "Development Tools" 
$ sudo dnf install -y autoconf automake libtool gettext git scons cmake flex bison libcurl-devel curl ncurses-devel ruby bzip2-devel expat-devel 
$ git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew 

直到LinuxBrew是固定的,following is required.

添加到.bashrc

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH 

##安装Linux的酿造

export LINUXBREWHOME=$HOME/.linuxbrew 
export PATH=$LINUXBREWHOME/bin:$PATH 
export MANPATH=$LINUXBREWHOME/man:$MANPATH 
export PKG_CONFIG_PATH=$LINUXBREWHOME/lib64/pkgconfig:$LINUXBREWHOME/lib/pkgconfig:$PKG_CONFIG_PATH 
export LD_LIBRARY_PATH=$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH 


$ ln -s $(which gcc) ~/.linuxbrew/bin/gcc-4.4 
$ ln -s $(which g++) ~/.linuxbrew/bin/g++-4.4 
$ brew update 

$ brew install node  # get node.js 
$ npm install -g appium # get appium 
$ npm install wd   # get appium client 
$ appium &    # start appium 

你好appium的安装非常简单,请检查下面的步骤

1)安装最新的Node.js

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

更多信息,请查询官方网站: 2)安装最新Appium

npm install -g appium 

sudo npm install -g appium 

的更多信息请查看官方文档:

https://www.npmjs.com/package/appium