appium学习记录

appium学习记录,第1张

概述环境搭建 java和Android-SDK sdkmanager安装SDK-Toolsplatform-toolsbuild-tools 最少安装一个版本的sdk-platform Node.js安装 Appium-desktop Appium-client(pip安装或者github上下载安装) uiautomatorviewer自己截图定位ad

环境搭建
  java 和 AndroID-SDK
  sdkmanager 安装 SDK-Tools platform-tools build-tools
  最少安装一个版本的 sdk-platform

  Node.Js安装

  Appium-desktop
  Appium-clIEnt(pip安装 或者 github上下载安装)

 

uiautomatorvIEwer 自己截图 定位

adb shell uiautomator dump /sdcard/app.uixadb pull /sdcard/app.uix F:/app.uixadb shell screencap -p /sdcard/app.pngadb pull /sdcard/app.png F:/app.png

 

获取packagename  和 入口activity  aapt dump badging //path   		cmd需要cd  到path 去, 不然 可能会“dump Failed because no AndroIDManifest.xml found”或者  打印手机日志   adb logcat -v time -s ActivityManager | findstr name=

  

定位driver.find_element_by_ID('com.tencent.mobileqq:ID/btn_login') driver.find_element_by_xpath('//androID.Widget.EditText[@content-desc="请输入QQ号码或手机或邮箱"]')driver.find_element_by_accessibility_ID('请输入QQ号码或手机或邮箱')   content-descAndroIDUiautomator定位# 包含text文字driver.find_element_by_androID_uiautomator('new UiSelector().textContains("机")')# 以text什么开始driver.find_element_by_androID_uiautomator('new UiSelector().textStartsWith("手")')# 正则匹配textdriver.find_element_by_androID_uiautomator('new UiSelector().textMatches("^手.*")') # classnamedriver.find_elements_by_androID_uiautomator('new UiSelector().classname("androID.Widget.TextVIEw")')# classnameMatchesdriver.find_elements_by_androID_uiautomator('new UiSelector().classnameMatches("^androID.Widget.*")') # resource-ID、resourceIDMatchesdriver.find_element_by_androID_uiautomator('new UiSelector().resourceID("com.syqy.wecash:ID/et_content")') # descriptiondriver.find_element_by_androID_uiautomator('new UiSelector().description("S 日历")')# descriptionStartsWithdriver.find_element_by_androID_uiautomator('new UiSelector().descriptionStartsWith("日历")')# descriptionMatchesdriver.find_element_by_androID_uiautomator('new UiSelector().descriptionMatches(".*历$")')

 

总结

以上是内存溢出为你收集整理的appium 学习记录全部内容,希望文章能够帮你解决appium 学习记录所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1062268.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存