API …
Tools & diagnostics

Cookies, storage, console & errors

Read and write cookies and localStorage, request geolocation, emit console messages and throw real JavaScript errors.

Practice tasks

  • Set a cookie and assert it with context.cookies() / driver.get_cookies().
  • Write to localStorage and read it back via evaluate / execute_script.
  • Listen to console events and capture the warn and error messages.
  • Listen for pageerror and assert the uncaught error text.
  • Grant or deny geolocation permission and assert the outcome.

More Tools & diagnostics practice