使用Flutter Integration_test软件包授权相机访问在集成测试中

发布于 2025-02-05 09:40:04 字数 203 浏览 1 评论 0原文

我想使用Integration_test软件包为应用程序测试我的应用程序添加图片(使用相机)功能。当App试图打开相机时,它要求获得相机许可,我找不到可以在系统对话框中允许使用的方法。

我正在寻找两个解决方案。

1-找到一种控制系统对话框的方法,以便我可以使用小部件测试仪点击允许按钮。 2-当我启动应用程序进行测试时,我想设置所有权限。请注意,我只想进行测试。

I want to test Add Picture (using camera) feature for my app using integration_test package for app. When app tries to open a camera it asks for camera permission and I could not find a way to tap allow permission as its a system dialog.

I am looking for two solution.

1 - Find a way to control System dialog so I can tap allow button using Widget Tester.
2 - I want to set a all permission when I start the app for Testing. Please note that I want to do only for testing.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

两个我 2025-02-12 09:40:05

截至目前,集成测试无法与本机弹出窗口和其他应用程序进行交互。

但是解决了这个问题的方法在这里

as of now integration test can't interact with native popups and other application.

But solution to this problem was given here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文