Using a block action can help you remove unwanted elements from a page. You can use it to uncover hidden elements, block advertisements, carousels, and more.
In this lesson you'll learn how to block:
Using the selector tool.
Open the perform actions panel.
Select the block action.
Using the selector tool, click on the element you want to block in the preview.
If you can't select the element or if it failed to apply, try using an ID, Class, or XPath.
Using an ID, Class, or XPath.
Open the perform actions panel. Then, select the block action from the dropdown.
Open the website in a new tab.
Next, right-click, then inspect. This will bring up the website's source code.
Using the built-in selector tool, select the element you want to block in the window. This will highlight the element in the code.
Now that the corresponding line of code is highlighted, we can copy the Class or ID name. If you don't see either, go to the next step.
Class Name = ad-unit__ad ad-unit__leaderboard
All elements with the same class name will be blocked.
ID Name = #tc-ad-leaderboard
Remember to include a # when using IDs.
If you weren't able to find a Class or ID name, you can copy the XPath. Right-click on the line of code. Then, click on Copy selector or XPath.
Next, head back to Visualping and paste the Class, ID, or XPath into the input field.
1: Blocking Cookie Agreement
In this example, we are using a block action to remove a cookie panel from the page.
Note: You could have also used a click action.
2: Stock Tickers
Websites that have dynamic elements can trigger false notifications. For example, if we block a stock ticker, it won't be detected on every check.
Advertisements can cause frequent false positives. In this example, we remove it by class name.