QA AND TEST AUTOMATION · PART 1 · MANUAL TESTING, PROPERLY · TOOLS · 20 OF 112

Chrome DevTools for Testers: Network, Console, Storage

The browser developer tools a tester uses every day: the Elements panel to inspect and find locators, the Console for errors, the Network panel to see every API call with its status and body, Application storage for tokens, throttling and device mode, and Copy as cURL for bug reports. All on ShopRung, finding whether a bug lives in the page or the server.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 67
  63. 68
  64. 69
  65. 70
  66. 71
  67. 72
  68. 73
  69. 74
  70. 75
  71. 76
  72. 77
  73. 78
  74. 79
  75. 80
  76. 81
  77. 82
  78. 83
  79. 84
  80. 85
  81. 86
  82. 87
  83. 88
  84. 89
  85. 90
  86. 91
  87. 92
  88. 93
  89. 94
  90. 95
  91. 96
  92. 97
  93. 98
  94. 99
  95. 100
  96. 101
  97. 102
  98. 103
  99. 104
  100. 105
  101. 106
  102. 107
  103. 108
  104. 109
  105. 110
  106. 111
  107. 112
1 / 14

Press play to hear the narration, or step through at your own pace.

Key takeaways

  • Elements for markup and locators
  • Console for errors
  • Network for every call
  • storage, throttling, device mode

Notes

Open it

Open the tools with F twelve, or control shift I on Windows and Linux, or command option I on a Mac. You can also right click anything on the page and choose inspect. Four panels matter most for testers: Elements, Console, Network and Application. Dock the tools to the side or the bottom, whichever leaves room to see the page. Safari needs one setting turned on first: show features for web developers.

Open DevTools
  • Windows, Linux: F12 or Ctrl + Shift + I
  • Mac: Cmd + Option + I
  • or right-click → Inspect
  • panels a tester uses most: Elements, Console, Network, Application
  • tip: dock it to the right or bottom, whatever fits

Elements

The Elements panel shows the HTML behind the page. Right click the add to cart button on the green mug and inspect it. You see a button with an accessible label, add Green Build Mug to cart. That label is what automation tools use to find the button later, and what screen readers read aloud. Press control or command F inside Elements to try a CSS selector and see what it matches. In Part five, these become your locators.

Inspect the Add button
<button type="button"
  data-add="4"
  aria-label="Add Green Build
    Mug to cart">
  Add to cart
</button>

test hooks you will use later:
  role + name, data-testid
Ctrl/Cmd + F: test a selector

Edit live

You can edit the page live. Double click a product name and type a sixty character name: does the card wrap neatly or break the layout? Toggle a CSS rule off to see what it does, and check the computed tab for real sizes and colours. These changes only exist in your browser and vanish when you refresh, so you cannot break anything. It is a fast way to test layouts against long text before anyone writes the data.

Quick layout checks
  • double-click text to edit: a 60-character product name does the card wrap or break?
  • toggle a CSS rule to see what it does
  • Computed tab: real sizes, colours, fonts
  • changes are local only and vanish on refresh

Console

The Console shows JavaScript errors in red, warnings in yellow, and messages about failed requests. Search ShopRung for the single letter m, and the console shows a four hundred bad request for the products call. That one is expected, because the search needs two characters. A red type error is not expected, and it often explains a broken button. Glance at the console on every page you test, and paste errors into bug reports exactly.

What the Console shows
  • JavaScript errors (red) TypeError: cannot read ...
  • failed requests 400 (Bad Request) on /api/products?q=m
  • warnings (yellow)
  • tip: check it on every page
  • you test; copy errors into bug reports exactly

Network

The Network panel is the most useful of all. Filter to fetch and X H R to see only API calls, then place an order in ShopRung. You see a POST to slash API slash orders with status two hundred and one, and its timing. Click it to see the request headers, including the login token, and the response body with the new order and its status. Tick preserve log, so the list is not cleared when the page navigates.

Place an order, watch Network
filter: Fetch/XHR
POST /api/orders   201  12 ms
GET  /api/orders/3 200   4 ms

click the POST:
  Headers: Authorization:
    Bearer eyJhbGci...
  Response: {"id":3,
    "status":"PLACED", ...}
tick "Preserve log"

Page or server?

This is how you find where a bug lives. If the response from the server is wrong, like a wrong total in the JSON, it is a server bug. If the response is right but the screen shows something else, it is a front end bug. If the request itself carries bad data, the page sent the wrong thing. And if no request appears at all when you click, the button's code is broken, and the console usually says why. Put that diagnosis in the report.

Where does the bug live?
  • response wrong → server bug total in JSON is wrong
  • response right, screen wrong → front-end bug
  • request wrong → front-end sent bad data (qty "3"?)
  • no request at all → button handler broken (Console)
  • say it in the bug report

Copy as cURL

Right click any request and choose copy as c U R L. You get a command that replays exactly that request from a terminal, with its headers and body. Paste it into a bug report and the developer can reproduce the server side of the bug in seconds, with no clicking. One warning: the copied command contains your login token. On a real system, remove it or use a test account before sharing it outside the team.

Copy as cURL
right-click the request →
  Copy → Copy as cURL

curl 'http://localhost:8080/
  api/cart/coupon' \
  -H 'authorization: Bearer ..'
  -H 'content-type: ...json' \
  --data-raw '{"code":"SAVE10"}'

remove real tokens before
sharing outside the team

Throttling

The throttling menu slows the network to a slow mobile connection, or turns it off. Many bugs only appear when things are slow. On slow four G, place an order: is the button disabled while waiting, so a double click cannot create two orders? Go offline and apply a coupon: is there a clear message, or does nothing happen? You can also block one request address to see how the page behaves when one service fails.

Network conditions
  • throttling: Fast 4G, Slow 4G, 3G, Offline
  • try on ShopRung: Slow 4G + Place order: is the button disabled while waiting? (no double order) Offline + Apply coupon: is there a clear message?
  • block a request URL to simulate a failing service

Application

The Application panel shows what the site stores in the browser: cookies, local storage and session storage. ShopRung keeps the login token and the user's name in local storage. That opens quick tests. Delete the token and refresh: does the shop ask you to log in? Change one character of the token and open the cart: the server must answer four hundred and one, the token is not valid. That is a security check any tester can do.

ShopRung storage
Application → Local storage
  shoprung.token  eyJhbGci...
  shoprung.user   {"name":
                   "Alice Shah"}

tests you can do:
  delete the token → refresh
  → asked to log in?
  edit the token → 401
  "The token is not valid"

Device mode

The device toolbar, control or command shift M, emulates phone and tablet screens. Pick a phone or type a size like three ninety by eight four four, and check rule N F one on ShopRung: the header wraps, the search fits, the cart table scrolls sideways instead of breaking, and buttons are reachable. Remember that emulation is not a real phone. Touch, fonts and mobile Safari behave differently, so confirm important layouts on real devices too.

Device toolbar
  • Ctrl/Cmd + Shift + M
  • pick a phone or type a size e.g. 390 x 844
  • check NF-1 on ShopRung: header wraps, search fits, cart table scrolls, buttons reachable by thumb
  • emulation ≠ a real phone: touch, fonts, Safari differ

Common mistakes

Habits that mislead. Testing only with the cache disabled, or never with it disabled, when real users hit both. Forgetting preserve log, so the request you needed disappears. Treating your own live edits as proof of a bug. Pasting real tokens into reports. Relying on emulation instead of a real device. And ignoring the console, where the first clue usually appears.

Avoid these
  • testing with the cache disabled only (or never)
  • forgetting Preserve log
  • trusting edited HTML as proof of a bug
  • sharing tokens in reports
  • emulation instead of real-device checks
  • ignoring console warnings on every page

Say it like this

In the interview, say: I inspect elements to check the markup and find locators, watch the console for errors, and use the network panel to see every API call with its status and body, so I can tell whether a bug is in the front end or the back end. I attach copy as c U R L to reports, check storage and tokens, throttle the network to find loading bugs, and use device mode before checking real phones.

In the interview
  • "I inspect elements to check
  • markup and find locators, watch the Console for errors, and use Network to see every API call, its status and body, so I can say if a bug
  • is front-end or back-end. I
  • attach Copy as cURL, check
  • storage and tokens, throttle
  • the network and use device
  • mode."

Interview questions

Q1How do you find whether a bug is in the front end or the back end?

Use the Network panel: if the API response is wrong, it is a back-end bug; if the response is right but the page shows it wrongly, it is a front-end bug; if no request is sent, check the Console for a JavaScript error.

Q2What does the Network panel show?

Every request the page makes: method, URL, status code, timing, request and response headers, and request and response bodies.

Q3What is "Copy as cURL" useful for?

It turns a browser request into a terminal command with the same headers and body, so a developer can replay the server call exactly. Remove real tokens before sharing it.

Q4How would you test a slow network with DevTools?

Use network throttling (for example Slow 4G or Offline) and check loading states, disabled buttons, timeouts, retries and error messages.

Q5Where would you look for a JWT or session in the browser?

In the Application panel: cookies, local storage or session storage, and in the Authorization header of requests in the Network panel.

Q6What can the Elements panel be used for in testing?

Inspecting markup and accessibility attributes, finding and trying locators, and editing text or styles live to check layout limits.

Q7Is device mode enough for mobile testing?

No. It emulates screen size and touch, but real devices differ in browsers, fonts, performance and gestures, so important flows need real-device checks.

Q8What is "Preserve log" and why use it?

A Network and Console option that keeps entries when the page navigates or reloads, so requests from before a redirect are not lost.