phimage / Erik

Erik is an headless browser based on WebKit. An headless browser allow to run functional tests, to access and manipulate webpages using javascript.
http://phimage.github.io/Erik/
MIT License
595 stars 47 forks source link

"WKWebView.navigationDelegate must be used from main thread only" error when running tests #49

Open n2nco opened 4 years ago

n2nco commented 4 years ago

image

pvn-anh-pham commented 4 years ago

+1

phimage commented 4 years ago

You can comment and PR, it's just an assert

jakejcheng commented 4 years ago

@phimage what do you mean?

phimage commented 4 years ago

assert: https://developer.apple.com/documentation/swift/1541112-assert

jakejcheng commented 4 years ago

lol I know what assert is but im just not familiar with the whole threading stuff. So you mean that line is not needed?

phimage commented 4 years ago

no you must learn also about assert assert will not be executed with normal compilation flag (of release configuration) So this code is only in dev mode, and yes it could be commented..

Now if you want to know about threading stuff, just copy past the error message in short graphical element must be acceded from main thread only (to avoid many concurent issue, such as draw concurently)