I'm scraping a site that requires multiple steps, and each JavaScript line needs to be run after the webview is done loading. So far I've just been doing this manually by pressing a button when the page loads. How do I make the next step happen when the first line is completed.
I haven't found any onComplete functions or anything like that in the WKWebKit documentation.
When I try to put the code in the completion handler it just executes immediately.
I appreciate any help if anyone knows how to solve this issue. Thanks :)