Reputation: 3860
I need to choose an option from dropbox in one site with NSUrlConnection and then get the source code of the page, how do I actually choose the option with code or is it possible?
Upvotes: 0
Views: 233
Reputation: 96353
That's not what NSURLConnection does.
All NSURLConnection does is request a resource—in this case, a webpage on Dropbox's site. You then receive that resource (the text of the page) in the response.
You can't interact with the page at all, because NSURLConnection is not a web view. It's just a connection. There is no DOM, no JavaScript, no concept of forms or actions or inputs or anchors. You send a request and get data back—that's it.
You need a WebView or UIWebView (hidden or not) and you need to interact with that view's document through JavaScript. Or, better yet, use the Dropbox API rather than poking their webpages.
Upvotes: 2