//PuppeteerSharp
var _puppeter = await Puppeteer.LaunchAsync(new LaunchOptions() {
Headless = false,
Args = ["--disable-blink-features=AutomationControlled"]
});
var pagea = await _puppeter.NewPageAsync();
await pagea.EvaluateExpressionOnNewDocumentAsync("console.log('Hello from the browser!')"); //not trigger CloudFlare on click links
await pagea.GoToAsync("https://www.futbin.com/players");
//Playwright
var _playwright = await Playwright.CreateAsync();
var chrom = await _playwright.Chromium.LaunchAsync(new() {
Headless = false,
Args = ["--disable-blink-features=AutomationControlled"]
});
var pageb = await chrom.NewPageAsync(null);
await pageb.AddInitScriptAsync("console.log('Hello from the browser!')"); //trigger CloudFlare on click links
await pageb.GotoAsync("https://www.futbin.com/players");
Expected behavior
You can load target web Page with PuppeteerSharp and Playwright this is good,
but when you click links inside page if you use AddInitScriptAsync it will trigger CloudFlare (without AddInit not trigger it), i made same test on PuppeteerSharp cause it will call same function on Node (Page.addScriptToEvaluateOnNewDocument) it work.
Then should be something wrong in implementation with AddInitScriptAsync
Actual behavior
When you use AddInitScriptAsync and click links on target page will trigger CloudFlare, without not trigger it.
Version
1.46
Steps to reproduce
Expected behavior
You can load target web Page with PuppeteerSharp and Playwright this is good, but when you click links inside page if you use AddInitScriptAsync it will trigger CloudFlare (without AddInit not trigger it), i made same test on PuppeteerSharp cause it will call same function on Node (Page.addScriptToEvaluateOnNewDocument) it work. Then should be something wrong in implementation with AddInitScriptAsync
Actual behavior
When you use AddInitScriptAsync and click links on target page will trigger CloudFlare, without not trigger it.
Additional context
No response
Environment