如何在linux中安装和运行appium?

时间:2014-09-01 12:02:25

标签: android ui-automation appium uiautomator android-uiautomator

我想在真实的Android设备中打开网址进行UI自动化。为此,我想在我的linux系统上安装并运行appium,请指导我该怎么做?还建议我是否有使用eclipse在Chrome浏览器中打开网址?

5 个答案:

答案 0 :(得分:3)

我想在Linux中运行Appium所需的所有信息都在这里:

http://appium.io/docs/en/about-appium/getting-started/

如何运行测试

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

答案 1 :(得分:2)

在Linux 18.04上安装appium

如果安装了node.js,则可以尝试:

sudo npm install -g appium --unsafe-perm=true --allow-root

对我有用。

答案 2 :(得分:1)

在Linux上安装Appium(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 brew

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 

答案 3 :(得分:0)

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

1)安装最新的Node.js

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

更多信息请查看官方网站:https://nodejs.org/en/download/package-manager/

2)安装最新的Appium

npm install -g appium

sudo npm install -g appium

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

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

答案 4 :(得分:0)

nvm上安装

sudo apt install build-essential checkinstall
sudo apt install libssl-dev
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
node -v
npm -v
npm install -g appium