tomaskrupka / Gripper

A web-scraping toolbox for .NET.
https://tomaskrupka.github.io/Gripper
MIT License
0 stars 0 forks source link

Startup cleanup not purging everything #2

Open tomaskrupka opened 2 years ago

tomaskrupka commented 2 years ago

This

        WebClientSettings webClientSettings = new()
        {
            WebClientImplementation = WebClientImplementation.BaristaLabsCdtr,
            TriggerKeyboardCommandListener = true,
            UserDataDir = userDataDir,
            StartupCleanup = BrowserCleanupSettings.Cookies | BrowserCleanupSettings.Cache | BrowserCleanupSettings.Logins,
            UseProxy = true,
            Proxy = new System.Net.WebProxy("1.2.3.4", 8080),
            BrowserLocation = @"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe",
            RemoteDebuggingPort = 9244,
            Homepage = _homepage,
            DefaultPageLoadPollSettings = PollSettings.FrameDetectionDefault,
            TargetAttachment = TargetAttachmentMode.Auto,
        };

should be enough for a clean startup from an existing user data dir.

It is not, sometimes even the login persists.

tomaskrupka commented 2 years ago

This seems to happen with PWAs that rely heavily on background workers. Implementing IndexedDB and ApplicationCache cleanup might be enough.