I was wondering if there is any possible way to enter text inside a textfield on a website from an objective-c application, and then click a button. I basically want to put text into a textfield in the centre of a website page, and then click a button, without a web browser being open. If the page changes, I was planning to update the application to say that it was successful.
I was thinking to do something in reverse of downloading something. Could I reverse this code to download an image, so it uploads text into a textfield?
NSData * imageData = [[NSData alloc] initWithContentsOfURL: [NSURL URLWithString: @"http://myurl/mypic.jpg"]];
cell.image = [UIImage imageWithData: imageData];
[imageData release];
There is probably other things involved like using NSURLConnection and maybe NSURLResponse, which I can use (and have done before, only really simply), but I will need a bit of help if they are involved.
Im really not sure, and are there any search terms I might want to use for googling? The ones I come up with don’t seem to return any results.
Thanks in advance!
Ben
I found out that I could just use Javascript to manipulate the website, using a WebView object.
Just get the current scripting object:
Then implement javascript commands like this:
Then use
NSString‘s[NSString stringWithFormat:@"hello: %@", someString]for arguments.