How do you use DevTools in testing?
Each DevTools panel answers one question: Network what went out and came back, Console what broke, Elements what is in the DOM, Application what is stored. Preserve log and Disable cache keep requests from being lost or confused with cache, and Copy as cURL replays a request outside the browser. Chrome's default HAR export drops cookies and Authorization, but tokens in URLs and bodies remain, so the file is checked before attaching.
QA Fundamentals · Web and client-server
A user says the page is "glitching". What exactly do you look at in DevTools in five minutes?
A complaint "the orders list is empty" with no details. You can guess for an hour, or open DevTools, repeat the action and see what the browser actually did: did a request go out, what did the server answer, are there errors in the console, is the element in place. This lesson is about which panel answers which question, in what order to open them, and how to turn what you see into a report that a developer reproduces without clarifications.
How it works and why. DevTools works inside the browser, and the browser is the place where all layers of an application meet: the network, HTML and styles, JavaScript, storages. So one panel sees what no other will: Network sees every request and response, Elements sees the live DOM after scripts have run, Application sees the storages. Each panel answers one question, and that is more useful than "knowing all the buttons". An approximate order when something is wrong:
Inspection order
| Panel | Question | Example |
|---|---|---|
| Network | What went out and what came back? | Method, URL, parameters, status, body, headers, duration; the Fetch/XHR filter |
| Console | What broke in the scripts? | Unhandled exceptions, CORS errors, mixed content warnings |
| Elements | What is in the DOM now and which styles apply? | Whether the field is really disabled, why text sticks out of a block |
| Application | What is stored in the browser? | Cookies with flags, localStorage, sessionStorage |
| Device toolbar | How does it look on another screen? | Size, pixel density, touch, orientation |
| Throttling | How does it behave on a bad network? | Slow network and offline: a spinner, timeouts, an error message |
Network has several settings that save hours. Preserve log keeps the list of requests after a navigation or redirect, otherwise they vanish just when they are needed. Disable cache (works while DevTools is open) tells a "bug" from "an old copy in the cache". The context menu of a request has Copy as cURL, which turns the request into a command to repeat outside the browser, and Block request to simulate a failure of one resource. The Timing tab splits the time of a request into waiting, DNS, connecting and receiving, and the Initiator column shows which code started the request.
Example: from "the list is empty" to a report with evidence. The initial complaint and the same bug after inspection:
Before: "The orders list is empty. Chrome."
After:
Network: GET /api/orders?status=open → 500, 1.8 s
Response: {"error":"internal","requestId":"c41f-9a"}
Console: no errors, only the client message "Failed to load orders"
The request without the status parameter → 200, 12 orders
Evidence: HAR (tokens removed), a Network screenshot, requestId for the logs
Now we can see that the client asked for the list, the server failed and the client showed only a generic message. To finally separate the server from the interface, we repeat the request without the browser: Copy as cURL (the token in the example is replaced with a placeholder) and run it in a terminal or in Postman.
curl 'https://staging.example.com/api/orders?status=open' \
-H 'Authorization: Bearer <token>' \
-H 'Accept: application/json'
If curl also returns 500, the cause is on the server and the interface just informs poorly about the error. If with other parameters the answer is 200, we narrow the condition: the problem is in the value status=open. The report turned out meaningful because it holds the request, the response, the time and a requestId for searching the server logs.
Limits and alternatives. DevTools shows only the client's view. It will not show what happens on the server, only what the server answered. Throttling imitates the speed and latency of a network, but not a real radio network, the CPU and the battery of a phone, so mobile risks need a real device. Screen emulation (Device toolbar) changes size, density and touch events, but the engine stays the same, so it will not show Safari problems. Browser extensions (ad blockers, password managers) can distort the picture: a doubtful bug is worth repeating in a clean profile or in incognito. A CORS error is visible in Console even though the server may have answered correctly: the browser forbids the page to read the response. For mobile apps and traffic outside a browser, proxies are used (Charles, Fiddler, mitmproxy). For repeatable diagnostics in automated tests there are traces, for example Playwright Trace Viewer.
A separate word about HAR. It is a file with a record of all requests, and that is exactly why it is dangerous: it may contain tokens, cookies, passwords in a request body and personal data. Newer versions of Chrome hide sensitive fields on export by default, but before attaching it to a ticket, especially a public one, check the file yourself and remove what is not needed.
Common mistakes.
- Opening DevTools after the action: the request has already passed and is not recorded. Open the panel, turn on Preserve log and repeat.
- Looking only at the status and not reading the response body: it often has the cause or an ID for the logs.
- Concluding that nothing happened because Console is empty: the error may be a network one, visible only in Network.
- Attaching to a ticket a HAR or a screenshot with a token and other people's data.
- Drawing conclusions from device emulation without a real device where the risk is hardware (camera, keyboard, radio).
Check yourself
In Network the request to /api/orders is red and the Status column says (failed), not 500. How does it differ from 500 and where do you look?
Answer
Code 500 means the server answered with an error. Status failed means no response was received at all: a network drop, blocking or DNS. Chrome shows a CORS ban with its own status, CORS error. I look at Console (a blocked or net::ERR_… message) and at the request details: where exactly it was going.
Why does Slow 4G in DevTools not replace a check on a real phone?
Answer
Throttling imitates only the speed and latency of the network in a desktop browser. A real phone has a weaker CPU, another radio, a battery, a virtual keyboard and, in Safari, another engine. For risks tied to these, emulation is not enough.
Why must a HAR not be added to a public ticket without checking?
Answer
A HAR contains all the traffic, and it may have authorisation tokens, session cookies, password values and personal data. Whoever sees the ticket can use the token or read the data. Before adding it the file is checked and the sensitive parts are removed.