1. 对webview页面元素的处理
self.driver.switch_to.context("WEBVIEW_com.aaa.bbb")
source = self.driver.page_source
print("订单支付页面>>",source)
print("context>>",self.driver.context) # WEBVIEW_com.aaa.bbb
print("contexts>>", self.driver.contexts) #native_app webview_com.aaa.bbb
allure.attach(source,"订单支付页面webview内容")
print("001>>",self.driver.find_element(By.XPATH,".//*/ul/li/p[1]").text)
print("002>>", self.driver.find_element(By.XPATH, ".//*/ul/li[1]").text) # 订单信息,总保费1300元
print("003>>", self.driver.find_element(By.XPATH, ".//*/ul/li/p/span").text)

2. 获取子元素文本
flipper_text = self.driver.find_element_by_android_uiautomator(
'new UiSelector().resourceId("com.aaa.bbb:id/view_flipper")'
'.childSelector(new UiSelector().className("android.widget.TextView"))')

最新文章

  1. android textView 总是有paddingtop怎么解决
  2. 等比例压缩图片到指定的KB大小
  3. Android开发中Handler的经典总结
  4. 联想 thinkpad fn键关闭,优化使用
  5. How to update FVDI Commander driver to latest V2015.6.2
  6. java的CyclicBarrier
  7. json返回数据拼接HTML
  8. android scrollview 简单的使用
  9. 基础-JavaScript中的事件
  10. Docker 核心技术之Docker Compose
  11. 手机QQ公众号亿级消息实时群发架构
  12. Perl包和模块(内容来自beginning perl)
  13. dubbo控制器xml文件报错
  14. [py]js前端求和与flask后端求和
  15. .Net Core 2.0 生态(2).NET Core 2.0 特性介绍和使用指南
  16. vue项目权限控制
  17. 深度学习原理与框架-神经网络-线性回归与神经网络的效果对比 1.np.c_[将数据进行合并] 2.np.linspace(将数据拆成n等分) 3.np.meshgrid(将一维数据表示为二维的维度) 4.plt.contourf(画出等高线图,画算法边界)
  18. 如何利用 Visual Studio 自定义项目或工程模板(转载)
  19. centos7修改root密码
  20. php功能模块学习笔记

热门文章

  1. POJ 1887 Testingthe CATCHER (LIS:最长下降子序列)
  2. 流量数据iftop命令
  3. Day2代码
  4. Python学习笔记 capture 1
  5. linux下chm阅读器
  6. javaScript 对象学习笔记
  7. django项目所遇问题总结
  8. 03012_预处理对象executeQuery方法(实现数据库的查询)
  9. [Python] Generates permutations
  10. MongoDB + node-mongoskin简单演示样例