Making HTTP Requests using Chrome Developer tools

Since the Fetch API is supported by Chrome (and most other browsers), it is now quite easy to make HTTP requests from the devtools console. To GET a JSON file for instance: fetch(‘https://jsonplaceholder.typicode.com/posts/1’) .then(res => res.json()) .then(console.log) Or to POST a new resource: fetch(‘https://jsonplaceholder.typicode.com/posts’, { method: ‘POST’, body: JSON.stringify({ title: ‘foo’, body: ‘bar’, userId: 1 … Read more

Is it possible to send an array with the Postman Chrome extension?

You need to suffix your variable name with [] like this: If that doesn’t work, try not putting indexes in brackets: my_array[] value1 my_array[] value2 Note: If you are using the postman packaged app, you can send an array by selecting raw / json (instead of form-data). Also, make sure to set Content-Type as application/json … Read more

Chrome DevTools Devices does not detect device when plugged in

To get the functionality up and running: Follow steps at https://developers.google.com/chrome-developer-tools/docs/remote-debugging Install Windows USB driver http://developer.samsung.com/android/tools-sdks/Samsung-Android-USB-Driver-for-Windows Install Android SDK http://developer.android.com/sdk/index.html Install Android SDK Platform-tools http://developer.android.com/sdk/installing/adding-packages.html (this step was blocked on corporate wifi so I installed the single ADB package it required https://forum.xda-developers.com/showthread.php?t=2317790) Use command prompt to run ADB, in cmd go to the install directory … Read more

What does ==$0 (double equals dollar zero) mean in Chrome Developer Tools?

It’s the last selected DOM node index. Chrome assigns an index to each DOM node you select. So $0 will always point to the last node you selected, while $1 will point to the node you selected before that. Think of it like a stack of most recently selected nodes. As an example, consider the … Read more

What’s the difference between “Normal Reload”, “Hard Reload”, and “Empty Cache and Hard Reload” in Chrome?

Normal reload The same thing as pressing F5. This will use the cache but revalidate everything during page load, looking for “304 Not Modified” responses. If the browser can avoid re-downloading cached JavaScript files, images, text files, etc. then it will. Hard reload Don’t use anything in the cache when making the request. (which is … Read more

“CAUTION: provisional headers are shown” in Chrome debugger

The resource could be being blocked by an extension (AdBlock in my case). The message is there because the request to retrieve that resource was never made, so the headers being shown are not the real thing. As explained in the issue you referenced, the real headers are updated when the server responds, but there … Read more

Debugging “Element is not clickable at point” error

This is caused by following 3 types: 1.The element is not visible to click. Use Actions or JavascriptExecutor for making it to click. By Actions: WebElement element = driver.findElement(By(“element_path”)); Actions actions = new Actions(driver); actions.moveToElement(element).click().perform(); By JavascriptExecutor: JavascriptExecutor jse = (JavascriptExecutor)driver; jse.executeScript(“scroll(250, 0)”); // if the element is on top. jse.executeScript(“scroll(0, 250)”); // if the … Read more

How to search all loaded scripts in Chrome Developer Tools?

Open a new Search pane in Developer Tools by: pressing Ctrl+Shift+F (Cmd+Option+I on mac) clicking the overflow menu (⋮) in DevTools, clicking the overflow menu in the Console (⋮) and choosing the Search option You can search across all your scripts with support for regular expressions and case sensitivity. Click any match to load that … Read more

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