问题描述
我正在尝试在 Chrome 中自动化测试用例,我想将附件上传到电子邮件.我使用desiredCaps['browserName'] = 'Chrome'.单击电子邮件中的附件时,它会打开手机中的文档,但我无法检测到文档屏幕中的元素.
I am trying to automate a test case in Chrome where I would like to upload an attachment to an email. I use desiredCaps['browserName'] = 'Chrome'. While clicking attachments in email, it opens the Documents in the phone, but I am unable to detect the elements in the Documents screen.
推荐答案
您应该将上下文从 Chromium 更改为 'NATIVE_APP' appium doc about it (http://appium.io/docs/en/writing-running-appium/web/hybrid/) 并使用触摸操作选择你的文件
You shoud change context to from Chromium to 'NATIVE_APP' appium doc about it (http://appium.io/docs/en/writing-running-appium/web/hybrid/) and use Touch Actions for choose you file
这篇关于如何使用 Appium 在浏览器测试中上传附件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!