iphone - Trigger an HTML button click through objective-c? -
My goal is to send an HTTP request to a web server, give it the username and password I found that part, and It worked surprisingly well. But, in fact, the click on the "login" button should be clicked on it completely stumped me ??
NSLog (@ "Start the connection"); NSURL * Login Page = [NSURL URLWithString: @ "www.A_WEBSITE.com"]; ASIFormDataRequest * Request = [ASIFormDataRequest request with url: login page]; [Request Security Mode: @ "Post"]; [Request setPostValue: @ "username": @ "ct100_plnMain_txtLogin"]; [Request setPostValue: @ "password" for: @ "ct100_plnMain_txtPassword"]; [Start request]; NSLog (@ "This worked"); [Requested Setded File Selector: @Selector (Attempt File);] [Request Setfinder Chooser: @Slector (Encryptused)]; NSError * Error = [Request Error]; If (! Error) {NSString * response = [requeststring request]; NSLog (@ "% @", response); } Other {NSLog (@ "% @", [Request Error]); } Does anyone know that I can trigger the occurrence of a click on the button, does the ID have an ID?
Use JS to send a request and verify it by:
- (BOOL) webview: (UIWebView *) webView should startLoadWithRequest: (NSURLRequest *) Request Navigation Type: (UIWebViewNavigationType) Navigation Type;
Comments
Post a Comment