Conor Taylor
Conor Taylor

Reputation: 3108

Printing current WebView page as HTML Cocoa

How to I print (or store as a string) the HTML of the current page being displayed in a WebView?

Upvotes: 0

Views: 320

Answers (1)

user1203650
user1203650

Reputation: 300

I tried this:

 NSString *test = [webViewTest stringByEvaluatingJavaScriptFromString:@"document.documentElement.outerHTML"];
It works.

Upvotes: 2

Related Questions