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

Enable accessibility programmatically on load #78

Merged
merged 3 commits into from Nov 1, 2011

Conversation

Projects
None yet
2 participants
@sgleadow
Copy link
Contributor

sgleadow commented Oct 7, 2011

It's a pain to have to enable accessibility in the Settings app before running tests. This code edits the relevant plist file automatically on load. I discovered it needs to be done pretty early, so it's done on class loading - calling on init didn't seem to work (plist content and timestamp did not change).

This seems to correctly enable accessibility, but the method to check whether accessibility was enabled returned true in both cases. However, tests failed without enabling accessibility, and passed with this method being called, so it seems to be working as expected (maybe we need a new way of checking accessibility being enabled?)

It works for the simulator only, and was testing with iOS 5.0 Simulator SDK.


+ (void)_enableAccessibilityInSimulator;
{
NSAutoreleasePool *autoReleasePool = [[NSAutoreleasePool alloc] init];

This comment has been minimized.

@puls

puls Oct 26, 2011

Contributor

autoreleasePool, I believe.

This comment has been minimized.

@sgleadow

sgleadow Oct 27, 2011

Contributor

Fixed and updated... got overly keen with my camel casing there!

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