Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INJECT_EVENTS permission issue #922

Open
huseyinbarin opened this issue Aug 19, 2020 · 2 comments
Open

INJECT_EVENTS permission issue #922

huseyinbarin opened this issue Aug 19, 2020 · 2 comments

Comments

@huseyinbarin
Copy link

I am a newbie for Calabash community,
While executing the calabash tests on the emulator Nexus 5X API level 26, the emulator crashes probably because of an appearing pop-up from a different application with the following exception.

Failed to perform gesture. java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission

I am also aware that this issue is created and closed before without a concrete solution/fix for that. May be community can help me out about the following questions

  • Could that pop-up be related to google play services/google play store or it is crashing because of sth else.
  • Any screenshot is available for this issue
@Julioevm
Copy link
Contributor

Julioevm commented May 7, 2021

Hey @huseyinbarin, I know this is a late response... By default, Calabash cant interact with system elements or other apps. Hence you get that message when a pop-up unrelated to the main app running with Calabash receives an action. Very likely some integration with a google service. Now, we have enabled some changes that let you use uiautomator, that lets you interact with this type of element. So you should be able to handle such element if it were to appear, and tap on a dismiss button or whatever.

@JoeSSS
Copy link
Contributor

JoeSSS commented May 7, 2021

I wonder if such an element has a specific locator/text where Calabash can automatically close it, not sure how to make test automation always expect an unexpected google service popup 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants