I want to set download behaviour of browser for testing needs
I had tried solution from this topic: puppeteer - how to set download location
var browser = await StartNewChromeAsync(); //starting new chrome without extensions
var pages = await browser.PagesAsync();
var firstPage = pages[0];
var cdp = await firstPage.Target.CreateCDPSessionAsync();
await cdp.SendAsync("Page.setDownloadBehavior", new
{
behavior = "allow",
downloadPath = Path.GetAbsolutePath("./testing_downloads")
});
await cdp.DetachAsync();
I expecting, that files will be downloaded in ./testing_downloads
, but it downloadings in default path.
What am i doing wrong?