Anti-bot systems check more than fingerprint. They look at whether the browser belongs to a real returning person: cookies, saved logins, history, extensions, and site permissions all factor in. A brand-new empty profile is itself a signal. WithProfileDataDirectory points GPAL at a Chrome user-data directory on disk; WithProfileUserName finds the profile by Windows account. Sign in and browse once with that profile, and every GPAL session after inherits that history.
// Use an existing, signed-in Chrome profile
GPAL
// Or locate a profile by the Windows account that owns it
GPAL
If both WithProfileUserName and WithProfileDataDirectory are set, the explicit directory takes precedence.
If you don't specify a profile at all, GPAL creates a brand-new, empty Chrome user-data directory for that session. Chrome 136+ requires a user-data directory to be specified for anything, so GPAL always provides one. GPAL tracks that it created this temporary profile and removes the directory again when the browser closes, so nothing accumulates on disk between runs. This is the simplest path and is fine for quick, one-off tasks where stealth doesn't matter.
// No profile specified - GPAL creates a temporary one
GPAL
A freshly created profile has no cookies, no saved logins, no history, and no extensions. Which is exactly the pattern many anti-bot systems flag as automation. It can also trigger first-run dialogs (default browser prompts, sign-in nags, 'import bookmarks' offers) that a warmed-up profile would already have dismissed once. For sites that are sensitive to bot traffic, or for long-running/scheduled jobs where you want the session to look like the same returning user every time, set up a dedicated profile once. Sign in, browse around a bit, accept the usual cookie banners. And point GPAL at it with WithProfileDataDirectory rather than relying on the temporary default.
Worth knowing before it costs you an afternoon. A Chromium browser hosting an extension's background page does not exit when its last window closes: it starts a replacement with --no-startup-window and that one keeps the user data directory open. OttoMagic is such an extension, so this happens on every OttoMagic run. Edge does it. Chrome, as of this writing, does not. The consequence is the warning above, arriving where you would not think to look for it: the browser is off your screen and gone from your taskbar, yet the profile is still held, so the next run on it is handed to the invisible survivor and exits with no debugging port and no extension. What you see is a workflow that launches nothing and fails saying very little. GPAL closes that successor when it closes the browser it started, so an ordinary run leaves nothing behind. A run that is killed rather than closed does leave it, and then it is yours to find: look for msedge.exe running with no window, whose command line is --no-startup-window. To stop it happening at all, turn off "Continue running background extensions and apps when Microsoft Edge is closed" in edge://settings/system. GPAL will not do that for you: the setting is browser wide rather than per profile, so changing it would change the browser you use yourself.
Because the temporary profile directory is created fresh and removed on close, it is safe to run several GPAL sessions in parallel without profile collisions. A persistent profile passed to WithProfileDataDirectory is different: it must not be used by two browser sessions at once. Chromium hands its command line to whichever browser already owns a user data directory and then exits, so the flags this run needs, the debug port above all, are dropped and the launch looks like it worked while nothing is actually listening. GPAL checks for that before launching and refuses, naming the process that already holds the profile, rather than letting the run fail later for a reason that points nowhere near the cause.
Showing off some plain text in these paragraphs eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quo veniam mollitia excepturi animi eum illum non libero sapiente provident assumenda, delectus voluptatum nobis sed dolorem adipisci laudantium incidunt. Error, ratione?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quo veniam mollitia excepturi animi eum illum non libero sapiente provident assumenda, delectus voluptatum nobis sed dolorem adipisci laudantium incidunt. Error, ratione?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quo veniam mollitia excepturi animi eum illum non libero sapiente provident assumenda, delectus voluptatum nobis sed dolorem adipisci laudantium incidunt. Error, ratione?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quo veniam mollitia excepturi animi eum illum non libero sapiente provident assumenda, delectus voluptatum nobis sed dolorem adipisci laudantium incidunt. Error, ratione?
Here you can find different accents and emphasis sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
This is a link and how it could look like bestlinkinthebeautifulworld. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Here's just some classic bold text adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam notBoldSecondbestlinkinthebeautifulworld illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Obcaecati, iste distinctio veritatis eligendi laboriosam adipisicing elit illo nostrum corporis at adipisicing elit libero vel voluptas? Expedita, adipisicing facere dolores voluptatem ad ab rem assumenda soluta!
Other cuple of colors in case we want to emphasize several ways adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam adipisicing elit illo nostrum corporis at voluptatem libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta! Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quod veniam, quam ad expedita laborum sed at voluptates culpa ipsam ut vel. Ullam temporibus a mollitia quod aliquam ratione exercitationem nesciunt.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta! Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quod veniam, quam ad expedita laborum sed at voluptates culpa ipsam ut vel. Ullam temporibus a mollitia quod aliquam ratione exercitationem nesciunt.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, iste distinctio veritatis eligendi laboriosam illo nostrum corporis at libero vel voluptas? Expedita, facere dolores voluptatem ad ab rem assumenda soluta!
Lorem ipsum dolor sit amet consectetur adipisicing elit. Repudiandae quas consequuntur illo numquam assumenda autem exercitationem distinctio perspiciatis in natus. Eius dicta similique ipsam ipsa minima, nemo quae enim tempore.
GPAL
.CallIfNotFound(GenericCallIfNotFound)
.WithPublishToConsole();
//System.Drawing.Rectangle windowSize = new System.Drawing.Rectangle(10, 10, 1500, 1024);
// NOTE: we have to set browser = before we execute any steps
// this is due to the 'GenericCallIfNotFound' which might throw an exception, and BankScraper will not have the browser set when it calls scraper.Close()
// until the complete fluent line gets executed (meaning every step, meaning browser is not set until everything else succeeds)
browser = GPAL.Browser
.WithBrowserType(Enums.BrowserType.Chrome)
.WithProfileDataDirectory(ChromeProfileLocation)
.WithUseAutomationEngine(AutomationEngine.Selenium)
.WithWindowSize(new System.Drawing.Rectangle(0,0,1920,1080))
.ToGPALObject();