unable to tap or find views when using MFMailComposeViewController #157

Closed
davidsmilebox opened this Issue Oct 16, 2012 · 3 comments

Comments

Projects
None yet
4 participants

there is a portion of our app which we want to test that launch's apples email controller MFMailComposeViewController (standard interface that manages the editing and sending an email message). However after the app presents this controller modally, any further steps we do fail because they appear to be unable to find a label (trying to tap cancel, send, "to:" field, etc ). We also tried using a screen location but the controller does not seem to respond to this either.

Do you have any suggestions for addressing this case? Do you expect the framework to be able to support this case?

Contributor

efirestone commented Oct 16, 2012

Unfortunately in iOS 6 and later I don't believe this will be possible.
Apple switched the mail compose view to use something called remote view
controllers (excellent article here:
http://oleb.net/blog/2012/10/remote-view-controllers-in-ios-6/), which
means that your app (and consequently KIF) has no access to the view
hierarchy at all.

It's possible that we can detect this case in KIF and somehow get the
screen location tap to work, but it would take some investigation.

On Tue, Oct 16, 2012 at 12:54 PM, davidsmilebox notifications@github.comwrote:

there is a portion of our app which we want to test that launch's apples
email controller MFMailComposeViewController (standard interface that
manages the editing and sending an email message). However after the app
presents this controller modally, any further steps we do fail because they
appear to be unable to find a label (trying to tap cancel, send, "to:"
field, etc ). We also tried using a screen location but the controller does
not seem to respond to this either.

Do you have any suggestions for addressing this case? Do you expect the
framework to be able to support this case?


Reply to this email directly or view it on GitHubhttps://github.com/square/KIF/issues/157.

Contributor

bnickel commented Sep 16, 2013

Closing since there's nothing to be done within KIF.

@bnickel bnickel closed this Sep 16, 2013

tempire commented Feb 20, 2015

Use the accessibility inspector, you'll see that the Cancel button has a "Cancel" label, the Subject line has a "Subject:" label, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment