我需要在 webview 上自动按下“提交”按钮。我有:
#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
#import <WebKit/WebResourceLoadDelegate.h>
@interface AppDelegate : NSObject <NSApplicationDelegate>
@property (assign) IBOutlet NSWindow *window;
- (IBAction)start:(id)sender;
@property (weak) IBOutlet NSTextField *UserNameField;
@property (weak) IBOutlet NSTextField *PasswordField;
@property (weak) IBOutlet NSPopUpButton *IntervalSelector;
@property (weak) IBOutlet WebView *browser;
@property (weak) IBOutlet NSTextField *IDField;
@end
浏览器已完成加载,那么如何编写自动“提交”按钮推送?我不知道为什么它不起作用,任何指针?