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