DEV Community

bubuybawang
bubuybawang

Posted on

2 3

Inspecting Disappearing WebElement

Inspecting the source of a particular web element is sometimes tricky especially if the element in question disappears once the focus is removed from it, or sometimes even just moving the mouse pointer outside its borders.

The easiest way to capture these elements is to trigger the debugger of the browser to pause execution after a specified timeout - presumably with enough time have the disappearing element appear.

Just paste the snippet in to the browser's console. Just increase the timeout if 5 seconds is not enough.

setTimeout(() => { debugger; }, 5000)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay