Different ways to inspect disappearing elements on a browser (2024)

Different ways to inspect disappearing elements on a browser (3)

Have you ever had trouble inspecting elements on certain websites?For example sometimes you try to select an element, it disappears, making it hard to locate. This can be due to the various reasons.

However, when you need to debug. Chrome Dev Tools tools come to your rescue, allowing you to pause the execution when a DOM element undergoes changes and even monitor its attributes.

In this blog, I have explained 6 ways to inspect disappearing elements in DOM.

1. Events Listeners: Removing the blur property

a. Select Chrome Dev Tools and navigate to Elements

b. Access the Event Listeners Tab (From Right Side)

c. Select blur and expand the blur option

d. Click on remove for all the available properties.

With the above steps, the elements won’t disappear from the dropdown and you would be able to inspect them.

Different ways to inspect disappearing elements on a browser (4)

2. Emulate a focused page

In certain applications, we do not have blur property, but you can still inspect the hidden element by following the below approach.

a. Open chrome dev tools, click command+shift+p then type focus.

b. Select “Emulate a focused page”.

Now, the hidden elements will not disappear on the page and you would be able to inspect the elements on the web application.

Different ways to inspect disappearing elements on a browser (5)

3. Keyboard Shortcut: Fn+F8 or cmd+\

You can also pause the DOM elements by using the keyboard shortcutsfn+F8 (or Ctrl+/).It freezes the DOM , allowing you to inspect the elements on the page.

4. Source: Snippets

Another way to locate the auto-suggestion/ hidden dropdown values is using source:snippets.

a. Go to Dev Tools, and select the “Sources” tab.

b. Select snippet

Tip: Click on >> to move to the right if you don’t see a snippet on the screen

c. Click on New Snippet

Different ways to inspect disappearing elements on a browser (6)

d. Go to Script Snippet (right side section) and enter “debugger;”

c. Now, Right-click on the Script snippet and select Run (Just as shown in the below screenshot).

Different ways to inspect disappearing elements on a browser (7)

It will also help you inspect the elements on the page

Different ways to inspect disappearing elements on a browser (8)

5. Console: Script

a. Open the console tab in Developer Tools

b. Enter the below command command to pause execution and display “paused in debugger”

setTimeout(function() {
debugger;
}, 3000);

Different ways to inspect disappearing elements on a browser (9)
Different ways to inspect disappearing elements on a browser (10)

6. Break On :

You can also pause the DOM element by applying Break-On with Subtree Modifications.

a. Access Chrome Dev Tools

b. Navigate to the element that you want to set the breakpoint on.

c. Right-click on the element

b. From the Dom, right-click on the element and select Break on, and select all the attributes ( Just as shown in the below screenshot).

Now, you would be able to inspect the elements on the page

Different ways to inspect disappearing elements on a browser (11)

In this blog, I have explained multiple ways to inspect the auto-suggestion/ hidden dropdown values in DOM. I have shared 6 different approaches. Sometimes, the pause debugger doesn’t work but removing the blur options does. I hope, it helps you inspect disappearing elements on the web application.

Thanks for reading. Happy Learning! — AB

Ref : Naveen AutomationLabs ( https://youtu.be/SS3dfwygKig, https://youtu.be/zw99PZalGqA)

Thanks, Naveen AutomationLabs for the great content.

Different ways to inspect disappearing elements on a browser (2024)
Top Articles
Latest Posts
Article information

Author: Ouida Strosin DO

Last Updated:

Views: 5766

Rating: 4.6 / 5 (76 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Ouida Strosin DO

Birthday: 1995-04-27

Address: Suite 927 930 Kilback Radial, Candidaville, TN 87795

Phone: +8561498978366

Job: Legacy Manufacturing Specialist

Hobby: Singing, Mountain biking, Water sports, Water sports, Taxidermy, Polo, Pet

Introduction: My name is Ouida Strosin DO, I am a precious, combative, spotless, modern, spotless, beautiful, precious person who loves writing and wants to share my knowledge and understanding with you.