Browser DevTools for Testers

Browser developer tools (DevTools) are panels built into every major desktop browser that show what a page is made of and what it is doing: the live DOM and its styles, JavaScript messages, network requests, stored data and where the time goes. Open them with F12 or Ctrl+Shift+I (Cmd+Option+I on macOS), or right-click an element and choose Inspect. Safari shows them only after you turn on its web developer features in the Advanced settings.

For a tester, each panel answers one question. A profile form says "Profile saved", yet the old phone number returns after a reload. The screen cannot tell you why; the Network panel shows whether a request was sent, what it carried and what the server answered.

Why it matters

The screen shows a failure; the defect behind it is in the page's code, the server or the data. A report that says "Save does not work" makes a developer start from zero. "Save sends PATCH /api/v1/profile, the server answers 422 and the page still shows success" already tells the team that the server rejected the input and the page ignored the rejection.

DevTools also reveals failures the interface hides: a script error behind a button that does nothing, a request that fails silently, a session cookie that survives logout. Knowing the question each panel answers turns guessing into evidence.

One question per panel

Six panels cover most testing work. This lesson uses their names in Chrome; the DevTools in Edge are built from the same Chromium code, so names and layout match almost everywhere. Firefox and Safari have the same tools, in places under other names: Inspector for Elements in Firefox, Storage for Application and Responsive Design Mode for the device toolbar in both. Open the panel whose question matches the symptom in front of you.

  • Elements: what is on the page right now, and why does it look like this?
  • Console: did the page's code fail, and what did it say?
  • Network: what did the browser send, what came back, and how long did it take?
  • Application: what does this site store in my browser?
  • Performance: where does the time go during a load or a click?
  • Device toolbar: how does the layout respond to a phone-sized screen and to touch?
Six DevTools panels, six questions: the symptom tells a tester which panel to open, and each panel gives its own kind of evidence for the bug report.
PanelThe question it answersOpen it whenEvidence to record
ElementsWhat is on the page now, and why does it look like this?An element is missing, hidden, misplaced or styled wronglyThe element’s markup and the CSS rule that wins
ConsoleDid the page’s code fail, and what did it say?A click does nothing or part of the page stays emptyThe exact error text with its file and line
NetworkWhat was sent, what came back, how long did it take?Data is not saved or not shown, or a step is slowMethod, URL, status, payload, response and timing
ApplicationWhat does this site store in my browser?Login, logout or saved state behaves oddlyCookie names and attributes, storage keys and values
PerformanceWhere does the time go during a load or a click?A click responds late or content jumpsA recording that shows long tasks and layout shifts
Device toolbarHow does the layout respond to a phone-sized screen?Content overflows or controls are hard to tapThe viewport size or device preset, and a screenshot

Panel names as in Chrome; Edge’s DevTools match. Firefox and Safari use other names in places: Inspector for Elements (Firefox), Storage for Application, Responsive Design Mode for the device toolbar.

Elements and Console: the page and its code

Elements shows the live DOM, as in the lesson on the DOM. Select a node and the Styles pane lists the CSS rules that apply to it, with overridden declarations struck through: that is how you see why a button is grey or a label is cut off. The Accessibility pane shows its computed role and its accessible name, the name a screen reader announces.

You can edit text and styles in place to probe a problem, for example paste a long Arabic word into a label to see whether it overflows. Edits stay in your tab and vanish on reload: they show where a defect might be, not that the product works.

The Console lists JavaScript errors and warnings, failed resource loads and security messages, most of them linked to the file and line or the URL they come from. You can also type expressions to ask the page questions, as below. Never paste code you do not understand: it runs with your logged-in session. One limit: Chrome reduces navigator.userAgent to the major version followed by .0.0.0 and a fixed OS version, so take the exact browser version from its About page.

$0                            // the element selected in Elements
$0.disabled                   // is that button disabled right now?
$$('img:not([alt])').length   // images without an alt attribute
navigator.userAgent           // browser and OS; Chrome gives the major version only

Try it: User-Agent Parser

Network: what was sent and what came back

The Network panel records every request made while DevTools is open, with its status code, type, initiator, size and time. Click one to see its headers, the payload the page sent, the response and the timing.

One request tells you which side to suspect. Wrong data in the request: look at the page. Right request, wrong response: look at the server. Both right but the screen is wrong: look at how the page handles the response. A request that got no answer shows (failed) instead of a status code.

Open the panel before you reproduce the problem; earlier requests are not listed. Then use:

  • Preserve log, to keep the list when the page navigates, for example after a form submits.
  • Disable cache, so requests skip the browser's HTTP cache while DevTools is open. Cookies, stored data and any service worker stay, so for a first-time visitor's view use a private window.
  • Throttling, to simulate a slow connection or going offline and see the loading and error states.
  • The Fetch/XHR filter, to hide static files and keep the calls that carry data.
  • Copy as cURL, which turns the request into a command for curl, a command-line program that sends HTTP requests, so a developer can replay exactly what was sent. The command contains your cookies and the Authorization header: remove them before you share it.
  • Export HAR, to save every listed request in one file for the bug report. Chrome leaves out the Cookie, Set-Cookie and Authorization headers by default, but request and response bodies can still hold personal data.

Try it: cURL Parser Try it: HTTP Headers Parser Try it: JSON Formatter

Application, Performance and the device toolbar

Application shows what the site stores in your browser: cookies with their attributes (HttpOnly, Secure, SameSite, expiry, explained in the lesson on cookies and web storage), local and session storage, IndexedDB and service workers. You can edit or delete entries, or clear the site data to start fresh. A typical check: after logout, is the session cookie, the one that keeps you logged in, gone?

Performance records a load or an interaction and shows what the browser's main thread was doing. Long tasks, those over 50 ms, are marked in red and layout shifts have their own track, which explains a click that responds late or content that jumps. Results from your laptop are lab measurements, not your users' experience.

The device toolbar emulates a phone or tablet viewport, its pixel ratio, touch events and, with a device preset, its user agent. It is a fast first layout check, but the engine, CPU and fonts are still your desktop browser's; confirm important findings on a real device. The lesson on responsive testing goes through its limits in "What the device toolbar can and cannot tell you".

Try it: Cookie Analyzer

Worked example: "Profile saved", but nothing was saved

On staging, a tester changes the phone number to +966 50 123 4567, clicks Save and sees "Profile saved"; after a reload the old number is back. Instead of filing "Save does not work", she turns on Preserve log, filters on Fetch/XHR and repeats the steps:

  • The PATCH request (the HTTP method for changing part of a resource) carried the new number: the form collected the input correctly.
  • The server answered 422 (Unprocessable Content in RFC 9110), a refusal of the data: nothing was saved, as the GET after the reload confirms.
  • The page showed success anyway, so it does not check the response status; as in the lesson on JavaScript basics, a 4xx answer does not make fetch() fail. That is a defect in the page.
  • Are spaces allowed in a phone number? The requirement decides whether the server's validation has a second defect.
  • The report describes the page defect, raises the phone-format question and attaches the screenshot, the request and the response, without the session cookie.
Console   (no errors)

Network   Fetch/XHR, Preserve log on
  PATCH  https://staging.example.com/api/v1/profile
  Status:    422
  Payload:   {"phone":"+966 50 123 4567"}
  Response:  {"field":"phone","message":"Invalid phone format"}

  GET    https://staging.example.com/api/v1/profile    (after reload)
  Status:    200
  Response:  {"name":"Sara","phone":"+966501112233"}

Try it: HTTP Status Code Lookup

Common mistakes

  • Opening DevTools after the problem happened: earlier requests are not recorded, and without Preserve log a navigation or redirect clears the list.
  • Trusting the message on screen over the status code and the response.
  • Treating an edit in the Styles pane as a fix: users still get the shipped code.
  • Reporting every Console message: browser extensions add their own, so reproduce in a private window or a fresh browser profile first.
  • Attaching a cURL command or a HAR file that still contains cookies, tokens or personal data.
  • Taking the device toolbar or a fast laptop as the final word on mobile layout or speed.

The QA perspective

Testers keep DevTools open during exploratory sessions and whenever they reproduce a bug, and pick the panel by the symptom: Console for "nothing happens", Network for data that is not saved or shown, Elements for layout, Application for login and state. They record the method, URL and status, the relevant payload and response, the exact error text, the browser and its version, and for a layout bug the viewport size.

This evidence routes the bug: "right request, the server answered 500" goes to the back end; "right response, wrong value on screen" goes to the front end. Agree with your team which evidence the bug template expects. DevTools works on production too: look there but change nothing, and test only systems you are allowed to test.

Practice exercise

Diagnose a setting that does not stick

Your task

A colleague reports: "Turning off SMS offers in Notification settings does not work" (Chrome, staging). You reproduce it with DevTools open: you untick "SMS offers", select the checkbox in Elements, type an expression in the Console, click Save and see "Settings saved"; after a reload the box is ticked again. The symptom matches the worked example, but the capture below does not. Find where the defect most likely is and rewrite the report.

Optional: on a page you are allowed to test, copy one request as cURL into the cURL Parser, and paste its response headers into the HTTP Headers Parser.

Material
Elements  (the unticked SMS checkbox, selected)
  <input type="checkbox" id="sms-offers" name="sms" checked>

Console   (no errors; typed before clicking Save)
  > $0.checked
  < false

Network   Fetch/XHR, Preserve log on
  PATCH  https://staging.example.com/api/v1/notification-settings
  Status:    200
  Payload:   {"email":true,"sms":true}
  Response:  {"email":true,"sms":true}
Steps
  1. For each block of the capture, name the panel and the question it answers.
  2. Decide whether the defect is in the request, in the server's response or in how the page handles the response, and say why.
  3. Write the title, expected result, actual result and evidence of the bug report.
  4. Write the questions you would ask the developer or the product owner.
Show the model answer
Model answer

Panels: Elements (what is on the page now?) still shows the checked attribute, but as in the lesson on the DOM the attribute is only the starting state. The Console (did the page's code fail?) shows no errors, so no script crashed; the expression asks the page for $0.checked, the property that holds the current state, and it is false: the box really was unticked. Network (what was sent and what came back?) shows that Save sent "sms":true and the server answered 200 with the same values.

Location: the request is wrong. The box was unticked, yet the page sent "sms":true; the server stored what it received, so its 200, the "Settings saved" message and the ticked box after the reload are all consistent with that request. The defect is in the page (front end). A likely cause for the developer to confirm: the code reads the starting state (the attribute) instead of the current one (the property).

Report: title "Notification settings: unticking SMS offers is not saved, the request still sends sms:true". Expected result: the request carries "sms":false and the box stays unticked after a reload. Actual result: "Settings saved" appears, the request carries "sms":true and the box is ticked again after a reload. Evidence: the request and response without cookies or tokens, the Console line with $0.checked, screenshots before Save and after the reload, the browser version and the staging build.

Questions: does ticking a box fail the same way, and does the email box behave the same? Does it fail when the box is toggled with the keyboard as well as with the mouse? Is any rule meant to keep SMS offers on for some customers, and if so, why does the page say "Settings saved"? Because the defect overrides a customer's choice about marketing messages, make sure the product owner sees it early.

Frequently asked questions

Do I need to know how to code to use DevTools?

No. Reading the Network panel, the Console messages and the Elements tree needs only the web basics of this module. Typing short expressions in the Console helps, but most testing work with DevTools is reading, filtering and copying evidence.

Is it safe to use DevTools on production?

Looking is safe: inspecting elements, reading requests and recording performance change nothing on the server. Actions can have effects: replaying a request, running code in the Console or editing storage act with your account, so on production only observe unless you have permission. Edits in Elements and Styles change only what your tab shows, but a form you changed there and then submit sends real data to the server.

Which browser's DevTools should I learn?

Start with the browser your team targets most; the DevTools in Chrome and Edge are built from the same code. The questions each panel answers are the same in Firefox and Safari, only names and layout differ, and you will need them for cross-browser bugs.

References

  • What are browser developer tools? — MDNMDN Web Docs (Mozilla)An introduction to the developer tools built into browsers — the inspector, the JavaScript console and the debugger — for examining a page while testing it.
  • RFC 9110: HTTP SemanticsIETF · 2022The meaning of HTTP methods, header fields, status codes and content negotiation, independent of the wire version.
  • Using HTTP cookies — MDNMDN Web Docs (Mozilla)Cookie lifetime, scope, the Secure/HttpOnly/SameSite attributes and their security implications.
  • ISTQB GlossaryISTQBThe standard definitions of testing terms — test case, regression testing, severity, priority, boundary value analysis and the rest.

Practise with Mutqan tools

Parse a cURL command into method, URL, headers and body, then convert it to fetch, axios, Python or a structured request.

Web

Parse raw HTTP request/response headers into a structured table with explanations.

Web

Parse Set-Cookie headers and check Secure, HttpOnly, SameSite, Domain, Path, expiry and size best practices.

Validation

Parse User-Agent strings into browser, version, engine, OS, device type and bot detection.

Web

Format, beautify and validate JSON instantly in your browser with custom indentation.

JSON & Data

Go deeper

Your progress on this topic

Part of the QA Roadmap