ARC(Appium Ruby Console)是Ruby下的一个Console工具,可以实现更灵活的脚本输入。
github地址:https://github.com/appium/ruby_console
安装方式:
gem install --no-rdoc --no-ri appium_console bond
使用方法:新建一个目录,在目录中新建一个appium.txt文件,在文件中配置项目相关的基本信息:
[caps]
platformName = "android"
deviceName = "192.168.56.101:5555"
appPackage = "com.android.calculator2"
appActivity = ".Calculator"
[appium_lib]
sauce_username = ""
sauce_access_key = ""
然后进入appium.txt所在的目录,输入arc命令
➜ ~ arc
[1] pry(main)>
接下来可以通过find_element命令找到相关元素:
[1] pry(main)> nine = find_element name:9
#<Selenium::WebDriver::Element:0x6b024d96cec55626 id="1">
[2] pry(main)> nine.click
true
[3] pry(main)>
至此,本文档完~
下章:Appium Assertion