如何使用Appium在浏览器测试中上传附件? [英] How to upload attachments in browser tests using Appium?
本文介绍了如何使用Appium在浏览器测试中上传附件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在Chrome中自动执行一个测试用例,我想将附件上传到电子邮件中.我使用了requiredCaps ['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文档(
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在浏览器测试中上传附件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文