I'm trying to set the network capture content using node-slimerjs bridge for node js. What I would do using plain slimerJS is the following:
page.captureContent = [/html/, /text/];
but I have to use the getter setter functions in the node-slimerjs library so using the these functions I'm using the following code:
page.set('captureContent',[/text/,/html/]);
but the setter function isn't setting the value correctly and I'm left with the empty body for the network responses with text/* and html/* types. After setting the captureContent if I try to read the value with console.log I can see that only an empty object has been set to the capture content:
page.get('captureContent', function(err,val){
console.log('captureContent::: ',val)
});
from node console:
captureContent::: [ {}, {} ]
I also tried creating new regex objects and setting them using the setter function but got the same result.
var re = new RegExp("html");
var re2 = new RegExp("text");
In the SlimerJS documentation it is stated that by default this is limited to avoid memory problems. So it may be possible to unlimit this so... How can I set the pageContent in slimerJS either globally or from node-slimerJS library so I can see the network body for responses with certain content types?