Unknown “non-finite double value” Javascript error being thrown

I ran into the following error while doing actions.moveToElement(ele).click().build().perform() : javascript error: Failed to execute ‘elementsFromPoint’ on ‘Document’: The provided double value is non-finite. Some searches showed people in Chrome Mobile or other products receiving that, but I am just using the regular ChromeDriver (78) version with Java. They said it is fixed in a…

A JavaScript exception occurred while highlighting text in WKWebview

While trying to highlight text in WKWebview using JS files, it’s keep on failing and showing the below log. Optional(Error Domain=WKErrorDomain Code=4 “A JavaScript exception occurred” UserInfo={WKJavaScriptExceptionLineNumber=0, WKJavaScriptExceptionMessage=TypeError: undefined is not a function, WKJavaScriptExceptionColumnNumber=0, NSLocalizedDescription=A JavaScript exception occurred}) In func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) I’d added below lines DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(0.3 *…