首页 > 解决方案 > Auto accepting permissions when the dialogs are shown during Xamarin.UITest scenarios

问题描述

I'm using Specflow + Gherkin to automate UI Tests for my Xamarin native project, and I've seen that system dialogs are not represented in the REPL tree when they are encountered during a first-time run through. This is quite difficult for me to cover the app in many of it's use cases, as some of them involve displaying the right error messages. Is there a way to auto-accept permissions when they are encountered? AT this moment it is even difficult to tell if the permission dialogs are even popping up at all.

I've also noticed that we can use the keyboard to [Tab][Tab][Tab][Enter] to accept permissions, so how do I send this key sequence to the emulator using Xamarin.UITest? what are the workarounds others have tried?

I read something about Backdoors here, can this be used somehow? Any other suggestions?

标签: c#visual-studioxamarinui-automationxamarin.uitest

解决方案


推荐阅读