如何在 Ubuntu 中为 android 设置 Appium [英] How to setup Appium in Ubuntu for android

查看:27
本文介绍了如何在 Ubuntu 中为 android 设置 Appium的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 appium(自动化测试技术)的新手.

I am new in appium(automation testing technology).

我使用的是运行 Ubuntu Linux 的 PC.

I'm using a PC running Ubuntu Linux.

我已经搜索过这个主题,但没有得到任何有用的教程.谁能指出我正确的文档?

I have searched about this topic but I have not got any useful tutorial. Can anyone point me to the right documentation?

推荐答案

不要通过 apt-get 安装 nodejs,这需要 sudo 权限,如果 node 安装为 sudo 用户,appium 将无法运行.如果您已经安装,请使用

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

下载最新的 nodejs linux 二进制文件 http://nodejs.org/下载/

Download latest nodejs linux binaries form http://nodejs.org/download/

解压到不需要 sudo 权限即可访问的文件夹中,例如您的主文件夹.

Extract into a folder that doesn't need sudo rights to access, for example your home folder.

tar -xvf <downloaded_binary_tar.gz>

将以下行添加到您的 ~/.bashrc 文件中.

Add the following line to your ~/.bashrc file.

export PATH=$PATH:<full_path_of_the_extracted_node_folder>/bin

打开一个现在的终端并执行

Open a now terminal and do

npm install -g appium
appium

这篇关于如何在 Ubuntu 中为 android 设置 Appium的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆