You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functestSomething(){leturl:NSURL= // ...
let expectation =self.expectationWithDescription("description")Erik.visitURL(url){(obj,err)->Voidinifleterror=err{XCTFail("\(error)")}elseifletdocument=obj{
if /* check something into doc */ {expectation.fulfill()}}}self.waitForExpectationsWithTimeout(20,handler:{errorinXCTAssertNil(error,"Oh, we got timeout")})}
Advanced features
ifletengine=Erik.sharedInstance.layoutEngineas?WebKitLayoutEngine{letwebView:WKWebView=engine.webView
// add WKUserScript
// add WKScriptMessageHandler
// set a WKNavigationDelegate
}
Sample
OAuthSwift : fill connexion information, submit form then authrorize and finally handle callback redirection into WKNavigationDelegate