Official locator strategies for the webdriver

Yes, you saw it right. As per the current WebDriver – W3C Candidate Recommendation the Locator Strategies enlisted are as follows: “css selector”: CSS selector “link text”: Link text selector “partial link text”: Partial link text selector “tag name”: Tag name “xpath”: XPath selector Snapshot: However, the JsonWireProtocol was once used to support the Locator … 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

Why is the execution time of this function call changing?

V8 developer here. It’s not a bug, it’s just an optimization that V8 doesn’t do. It’s interesting to see that Firefox seems to do it… FWIW, I don’t see “ballooning to 400ms”; instead (similar to Jon Trent’s comment) I see about 2.5ms at first, and then around 11ms. Here’s the explanation: When you click only … Read more

How to change chrome packaged app id Or Why do we need key field in the manifest.json?

Once uploaded to the Chrome Web Store, your extension ID is fixed and cannot be changed any more. The ID is derived from the .pem file that was created the first time you (or the Chrome Web Store) packed the extension in a .crx file. When you load an extension in “unpacked mode”, an ID … Read more

Chrome “Active content with certificate errors”

To clear this error without a restart: Open developer tools Go to the Application tab Clear storage Close and re-open tab Commenters have pointed out the following: you must close all tabs in all windows which are open to the same domain (including subdomains) you can uncheck “cookies” before clearing storage to preserve login information … 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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)