Using ResourceHandler you can also intercept and handle AJAX requests and determine whether this request should be executed or not. To this, you need to register your own ResourceHandler implementation. For example:

private class TestResourceHandler : ResourceHandler
{
    public bool CanLoadResource(ResourceParams parameters)
    {
        if (parameters.ResourceType == ResourceType.XHR)
        {
            Console.WriteLine("Suppress ajax call - " + parameters.URL);
            return false;
        }
        return true;
    }
}


This resource handler is attached to the network service of the corresponding browser context:

    browser.Context.NetworkService.ResourceHandler = new TestResourceHandler();

Using the parameters variable, you can obtain the request URL and method. If CanLoadResource() returns false, the request will be cancelled.