DigitalGrowthPro
  • NEW!
    NEW!  Connect Ideas Across Notes
    Save time and share insights. With Paragraph Citation, you can quote others’ work with source info built in. If someone cites your note, you’ll see a card showing where it’s used—bringing notes closer together.
    Got it
      • Create new note
      • Create a note from template
        • Sharing URL Link copied
        • /edit
        • View mode
          • Edit mode
          • View mode
          • Book mode
          • Slide mode
          Edit mode View mode Book mode Slide mode
        • Customize slides
        • Note Permission
        • Read
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Write
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invite by email
        Invitee

        This note has no invitees

      • Publish Note

        Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

        Your note will be visible on your profile and discoverable by anyone.
        Your note is now live.
        This note is visible on your profile and discoverable online.
        Everyone on the web can find and read all notes of this public team.

        Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Explore these features while you wait
        Complete general settings
        Bookmark and like published notes
        Write a few more notes
        Complete general settings
        Write a few more notes
        See published notes
        Unpublish note
        Please check the box to agree to the Community Guidelines.
        View profile
      • Commenting
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Suggest edit
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
      • Emoji Reply
      • Enable
      • Versions and GitHub Sync
      • Note settings
      • Note Insights New
      • Engagement control
      • Make a copy
      • Transfer ownership
      • Delete this note
      • Save as template
      • Insert from template
      • Import from
        • Dropbox
        • Google Drive
        • Gist
        • Clipboard
      • Export to
        • Dropbox
        • Google Drive
        • Gist
      • Download
        • Markdown
        • HTML
        • Raw HTML
    Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Engagement control Make a copy Transfer ownership Delete this note
    Import from
    Dropbox Google Drive Gist Clipboard
    Export to
    Dropbox Google Drive Gist
    Download
    Markdown HTML Raw HTML
    Back
    Sharing URL Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Customize slides
    Note Permission
    Read
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Write
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- title: Setting Up BitBrowser with Playwright for Automated Profile Management tags: automation, playwright, browser-profiles, antidetect, multi-account description: A technical guide to integrating Playwright with BitBrowser for scalable, isolated browser profile automation without triggering detection systems. --- # Setting Up BitBrowser with Playwright for Automated Profile Management ![Setting Up BitBrowser with Playwright](https://hackmd.io/_uploads/Hkc8d5BsZe.jpg) > 🔧 **Level:** Intermediate–Advanced | ⏱ **Reading Time:** ~10 min | 📅 **Updated:** 2026 [TOC] --- ## Why Standard Playwright Automation Gets Detected Playwright is one of the most powerful browser automation frameworks available today. Developers use it for testing, scraping, and workflow automation. But there is a fundamental problem when you run Playwright out of the box: **every browser instance it launches looks identical to detection systems**. Platform anti-fraud engines do not only check IP addresses. They analyze a much broader set of signals simultaneously: - **Browser fingerprint** — canvas hash, WebGL renderer, font list, screen resolution - **Automation markers** — `navigator.webdriver` flag, CDP protocol traces, headless rendering artifacts - **Behavioral patterns** — mouse movement entropy, click timing, scroll velocity - **Profile consistency** — whether your cookies, timezone, and language match your IP geolocation A standard Playwright Chromium instance leaks most of these signals by default. It sets `navigator.webdriver = true`, uses a predictable headless fingerprint, and shares the same canvas hash across every session. Any platform running even basic fingerprinting will identify it as a bot within seconds. :::warning **Running Playwright without fingerprint isolation means all your automated profiles share the same browser identity — even if you rotate IP addresses. Platforms detect the shared canvas hash and will link all sessions to the same entity.** ::: This is where the combination of **Playwright + BitBrowser** changes the equation entirely. --- ## How BitBrowser Solves the Fingerprint Problem ![bitbrowser-features-1024x439](https://hackmd.io/_uploads/SJrGu9rjWx.png) [BitBrowser](https://client.bitbrowser.cn/register?lang=en&code=bit2H44) is an antidetect browser built specifically for multi-account operations. Each profile inside BitBrowser is assigned a fully isolated, spoofed browser environment — unique canvas fingerprint, WebGL renderer, fonts, timezone, screen resolution, and user agent. These are not masks applied on top of a single real fingerprint; they are genuine hardware-level spoofs generated per profile. When you pair this with Playwright's automation capabilities, you get the best of both worlds: - **BitBrowser handles identity isolation** — each profile presents as a unique, human device - **Playwright handles automation logic** — form filling, navigation, data extraction, task execution The integration works through BitBrowser's built-in **local API**, which exposes browser profile endpoints that Playwright can connect to via Chrome DevTools Protocol (CDP). This means you are not launching a fake browser — you are connecting Playwright to a real, fully fingerprinted BitBrowser profile. --- ## Prerequisites Before starting, make sure you have the following: - **BitBrowser** installed and running ([register here](https://client.bitbrowser.cn/register?lang=en&code=bit2H44)) - **Node.js** v18+ installed - **Playwright** installed (`npm install playwright`) - At least one configured browser profile in BitBrowser with a proxy assigned :::info **Proxy assignment is essential.** Each BitBrowser profile should have a dedicated residential or mobile proxy. Without this, multiple profiles sharing the same IP will still be linkable regardless of fingerprint isolation. BitBrowser supports HTTP, SOCKS5, and SSH proxy protocols. ::: --- ## Step 1 — Enable the BitBrowser Local API BitBrowser exposes a local REST API on `http://127.0.0.1:54345` by default. This API allows external tools — including Playwright — to open profiles and retrieve their CDP connection URLs. Open BitBrowser, go to **Settings → API Settings**, and confirm the local API is enabled. Note the port number (default: `54345`). You will use this in your Playwright scripts. --- ## Step 2 — Open a Profile via the API Each browser profile in BitBrowser has a unique `profileId`. To open a profile and get its debugging endpoint, send a POST request to the API: ```javascript const axios = require('axios'); async function openProfile(profileId) { const response = await axios.post('http://127.0.0.1:54345/browser/open', { id: profileId }); return response.data.data.ws.selenium; // CDP WebSocket endpoint } ``` The response returns a WebSocket URL like: ``` ws://127.0.0.1:9222/devtools/browser/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ``` This is the endpoint Playwright will connect to. --- ## Step 3 — Connect Playwright to the Profile Once you have the WebSocket URL, use Playwright's `connectOverCDP` method to attach to the running BitBrowser profile: ```javascript const { chromium } = require('playwright'); async function runAutomation(profileId) { const wsEndpoint = await openProfile(profileId); const browser = await chromium.connectOverCDP(wsEndpoint); const context = browser.contexts()[0]; const page = await context.newPage(); await page.goto('https://example.com'); // Your automation logic here await page.waitForTimeout(2000); await browser.close(); } ``` :::success **Key point:** You are calling `connectOverCDP` — not `chromium.launch()`. This connects to an already-running BitBrowser profile rather than launching a fresh Chromium instance. The fingerprint, cookies, and proxy configuration are all already applied by BitBrowser before Playwright touches the session. ::: --- ## Step 4 — Managing Multiple Profiles in Sequence For multi-account workflows, you will typically need to run operations across several profiles. The recommended approach is a sequential queue with delays between profiles to mimic natural human session patterns: ```javascript const profileIds = ['profile_001', 'profile_002', 'profile_003']; async function runAcrossProfiles(profiles) { for (const profileId of profiles) { console.log(`Starting profile: ${profileId}`); await runAutomation(profileId); // Random delay between 15–45 seconds between profiles const delay = Math.floor(Math.random() * 30000) + 15000; await new Promise(resolve => setTimeout(resolve, delay)); console.log(`Profile ${profileId} complete. Waiting ${delay / 1000}s...`); } } runAcrossProfiles(profileIds); ``` :::warning **Avoid running profiles in parallel unless you have a strong operational reason to do so.** Simultaneous activity across accounts from the same machine — even with separate fingerprints — can still create timing correlation signals. Sequential execution with randomized delays is the safer default. ::: --- ## Step 5 — Closing Profiles Cleanly Always close profiles through the BitBrowser API after your automation completes. This ensures cookies and session data are saved correctly and the profile is returned to a clean state: ```javascript async function closeProfile(profileId) { await axios.post('http://127.0.0.1:54345/browser/close', { id: profileId }); } ``` Call this at the end of each profile's automation sequence, after `browser.close()`. --- ## Step 6 — Human Behavior Simulation One of the most overlooked aspects of bot detection is **behavioral fingerprinting**. Even with a perfect browser fingerprint, unnaturally fast mouse movements or zero scroll activity will trigger behavioral risk models on sophisticated platforms. Playwright supports mouse movement simulation natively. Add these patterns to your scripts: ```javascript // Simulate natural mouse movement before clicking await page.mouse.move(100, 200, { steps: 20 }); await page.waitForTimeout(Math.random() * 500 + 300); await page.mouse.click(100, 200); // Add random scroll before interacting with page content await page.mouse.wheel(0, Math.floor(Math.random() * 300 + 100)); await page.waitForTimeout(Math.random() * 1000 + 500); ``` The `steps` parameter in `mouse.move` controls how many intermediate positions are generated, making the movement path look human rather than linear. --- ## Scaling to Team Operations When your automation operation grows beyond a single machine, profile portability becomes critical. BitBrowser supports **profile sync and team sharing**, meaning the same fingerprinted profiles can be accessed and automated from multiple machines or assigned to different team members. For teams running large-scale automation, [BitBrowser's cloud phone service](https://www.bitbrowser.net/cloudphone) extends this infrastructure to mobile environments. Cloud phone instances can be integrated into the same workflow for platforms that require mobile-specific behavior patterns or app-based interactions that Playwright alone cannot handle on desktop. --- ## Common Issues and Fixes | Issue | Likely Cause | Fix | |---|---|---| | `connectOverCDP` fails | Profile not fully launched yet | Add a 2–3 second wait after the open API call | | `navigator.webdriver` still visible | Using `chromium.launch()` instead of CDP | Switch to `connectOverCDP` method | | Sessions getting linked | Multiple profiles sharing same proxy | Assign dedicated proxy per profile in BitBrowser | | Automation detected despite setup | Behavioral patterns too fast | Add randomized delays and mouse movement steps | | Profile cookies not saving | Browser closed before API close call | Always call `/browser/close` via API, not `browser.close()` alone | --- ## Summary ![ffaf385a-2f18-45a7-83e4-431fb5d54644](https://hackmd.io/_uploads/SyuCOqBsZx.png) The BitBrowser + Playwright stack gives you a production-grade foundation for multi-profile automation that goes far beyond what standard headless browsers can achieve. BitBrowser handles the identity layer — fingerprint isolation, proxy binding, session persistence — while Playwright handles the logic layer — navigation, interaction, data extraction. The key principles to keep your automation running reliably: - Always connect via CDP, never launch a new Chromium instance - Assign dedicated proxies per profile - Run profiles sequentially with randomized delays - Simulate human behavior at the mouse and scroll level - Close profiles through the BitBrowser API, not directly To get started, [create your BitBrowser account here](https://client.bitbrowser.cn/register?lang=en&code=bit2H44) and configure your first set of isolated profiles before writing a single line of Playwright code. The automation is only as clean as the identity layer underneath it. --- *Found this guide useful? Share it with your team or drop a comment below with your specific use case.*

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully