forEach method of Node.childNodes?

DOM4 now defines NodeList as an iterable: iterable<Node>; According to the IDL draft, that means An interface can be declared to be iterable by using an iterable declaration (matching Iterable) in the body of the interface. iterable<value-type>; iterable<key-type, value-type>; Objects implementing an interface that is declared to be iterable support being iterated over to obtain … Read more

puppeteer: wait N seconds before continuing to the next line

You can use a little promise function, function delay(time) { return new Promise(function(resolve) { setTimeout(resolve, time) }); } Then, call it whenever you want a delay. console.log(‘before waiting’); await delay(4000); console.log(‘after waiting’); If you must use puppeteer use the builtin waitForTimeout function. await page.waitForTimeout(4000) If you still want to use page.evaluate, resolve it after 4 … Read more

Android 4.4 giving ERR_CACHE_MISS error in onReceivedError for WebView back

This error actually stems from outside of your application in most cases (occasionally it’s just a missing INTERNET permission, but that doesn’t sound like the case here). I was typing out an explanation, but found a much more straightforward example that doubles as an explanation in this answer to another question. Here’s the relevant bits, … Read more

How to access Chrome spell-check suggestions in JavaScript

How do I access Chrome’s spell-check suggestions for a misspelled word? To the best of my knowledge, you cannot. To answer more fully, I’ll also mention related issues: There was once an unofficial Google spell-check API that has disappeared You can download but not access Chrome’s built in dictionary There is no open API for … Read more

Failed to load resource: net::ERR_INSECURE_RESPONSE

Your resource probably use a self-signed SSL certificate over HTTPS protocol. Chromium, so Google Chrome block by default this kind of resource considered unsecure. You can bypass this this way : Assuming your frame’s URL is https://www.domain.com, open a new tab in chrome and go to https://www.domain.com. Chrome will ask you to accept the SSL … Read more

Timed out receiving message from renderer: 0.100 log messages using ChromeDriver and Chrome v80 through Selenium Java

Interim solution Here are the solutions for different variants of Chrome users. If you are using Chrome v80, using the recently released ChromeDriver 80.0.3987.106 solves the issue. Code Block: System.setProperty(“webdriver.chrome.driver”, “C:\\Utility\\BrowserDrivers\\chromedriver.exe”); WebDriver driver = new ChromeDriver(); driver.quit(); Console Output: Starting ChromeDriver 80.0.3987.106 (f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987@{#882}) on port 20041 Only local connections are allowed. Please protect ports used … Read more