Skip to content

Instantly share code, notes, and snippets.

View iamraafay's full-sized avatar
👨‍💻

Raafay iamraafay

👨‍💻
View GitHub Profile
@seansu4you87
seansu4you87 / KIFStep.m
Last active October 1, 2015 02:38
KIF enter text in UITextField inside UIWebView
If you are the only controlling the HTML, change it so that your input field has default values for accessibility. You can do this via several of the attributes. If you don't have access to the HTML...
You can inject javascript into your webview and change the title attribute of the <input> tags, giving them a default and static accessibilityLabel.
NSString *result = [self.webView stringByEvaluatingJavaScriptFromString:@"var inputs = document.getElementsByTagName('input');"
"for (var index = 0; index < inputs.length; index++){inputs[index].title = 'input ' + index;}"
];
Here I give the nth <input> tag an accessibility label of "input n".
anonymous
anonymous / gist:1269799
Created October 7, 2011 08:42
ObjectMapper Example
#import <Foundation/Foundation.h>
#import "JSONKit.h"
#import "ObjectMapper.h"
#import "TwitterSearchResult.h"
#import "Result.h"
#import "Metadata.h"
int main (int argc, const char * argv[])
{