Open clement128 opened 4 years ago
We could expose that property for sure. What would be the use-case scenario?
Hi @kblok, I have few extension methods for example:
public static async Task DisableImages(this Page page) {
await page.SetRequestInterceptionAsync(true);
page.Request += async (sender, args) =>
{
if (args.Request.ResourceType == ResourceType.Image) await args.Request.AbortAsync();
else await args.Request.ContinueAsync();
}
}
public static async Task DisableStyleSheet(this Page page) { // similar logic}
public static async Task IgnoreUrls(this Page page, params string[] urls) { // similar logic}
I want them separated and combinable on some cases case 1:
var page = await newPageAsync();
await page.DisableImages();
// my business logic
case 2:
var page = await newPageAsync();
await page.DisableImages();
await page.DisableStyleSheet();
// my business logic
case 3:
var page = await newPageAsync();
await page.DisableStyleSheet();
await page.IgnoreUrls("https://www.google.com");
// my business logic
Closed due to inactivity. Feel free to reopen it if needed.
Hi @kblok I think this is not solve yet? Or do you think these use-case scenario doesn't make sense?
Re-opening. Thanks @clement128 for pushing back.
Hi there, this is not a bug but more a question (sorry if it's not a right place to ask here let me know). How can I check if a request have been handled by interception? as per here https://github.com/puppeteer/puppeteer/issues/2687#issuecomment-463922612, puppeteer it have a property named '_interceptionHandled' to use, but seems puppeteer-sharp doesn't provide it.
many thanks