Popup blocking is enabled by default in Anchor Browser. It blocks cookie banners and consent dialogs to create cleaner automation experiences.
Popup blocking is enabled by default. Disable it only if you need to test popup-related functionality.
Quick Start
import AnchorBrowser from 'anchorbrowser';
(async () => {
const anchorClient = new AnchorBrowser({apiKey: process.env.ANCHOR_API_KEY});
const session = await anchorClient.sessions.create({
// Optional: Enabled by default (both), so this configuration is not required
browser: {
adblock: {
active: true // Required for popup blocking
},
popup_blocker: {
active: true // Blocks cookie banners and consent dialogs
}
}
});
console.log("Session:", session.data.id);
})().catch(console.error);
Popup blocking requires ad blocking to be active. Disabling ad blocking will result an error.
To disable popup blocking for a session, set active: false in the popup_blocker configuration:
import AnchorBrowser from 'anchorbrowser';
(async () => {
const anchorClient = new AnchorBrowser({apiKey: process.env.ANCHOR_API_KEY});
const session = await anchorClient.sessions.create({
browser: {
// Optional: ad blocking is enabled by default, so this configuration is not required
adblock: {
active: true // Ad blocking must remain active
},
// Required to disable popup_blocker
popup_blocker: {
active: false // Disables popup blocking for this session
}
}
});
console.log("Session:", session.data.id);
})().catch(console.error);
- Ad Blocker - Block ads, trackers, and malicious content (required for popup blocking)
- Captcha Solving - Solve CAPTCHAs that may appear when ad blocking is detected