参考网址
1.appium原理、client端搭建官网介绍:有问题就到appium官网上搜
原理: http://appium.io/docs/en/about-appium/getting-started/index.html#getting-started
client端搭建:http://appium.io/docs/cn/writing-running-appium/caps/index.html
desiredcapabilities:http://appium.io/docs/cn/writing-running-appium/caps/index.html
2.maven仓库介绍
http://maven.apache.org/index.html
https://mvnrepository.com/
3.appium问题github总结:有问题就到appium github官网上搜
https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md
4.adb命令
https://developer.android.google.cn/studio/command-line/adb
1.前置条件(appium服务端、环境配置完成)
1.Appium server:服务端(HTTP server)
1)安装appium desktop
作用:通过图形界面来启动appium服务器。
2.选择平台、对应驱动配置
要测试andriod应用,需要安装android sdk。
验证:cmd中输入【appium-doctor --android】
2.appium client(依赖环境添加)
由于appium只是一个HTTP server,所以他需要客户端的连接。
通过客户端发来指令,来确定启动那个session、执行什么动作。
appium使用WebDriver协议,与selenium使用协议一样,可以使用selenim作为客户端。但appium移动端特有的功能selenium无法实现,所以选择java客户端来扩展selenium客户端。
1.intellij中新建Maven项目
maven项目:项目管理工具,在pom.xml中配置依赖环境管理。
pom.xml配置项编写方法
1)从网页上找出(推荐下面第二个网址)
http://maven.apache.org/index.html
https://mvnrepository.com/
在这个网站中,可以查找依赖环境的配置
2)在intelliJ pom.xml中右键generate,在弹出的窗口中选Dependency,查找相应的
2.在pom.xml中配置
1)testng
2)selenium
3)java客户端
在mvnrepository.com中找
或者appinum官网上https://github.com/appium/java-client 官网上的版本在maven仓库上可能没有
pom.xml文件添加内容
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<!-- https://mvnrepository.com/artifact/io.appium/java-client -->
<dependency>