MangoTools / node-slimerjs

Other
16 stars 4 forks source link

Page CaptureContent for network content body not getting set correctly: #10

Closed pharzan closed 1 year ago

pharzan commented 8 years ago

I'm trying to set the network capture content as I would using plain slimerJS with the following:

page.captureContent = [/html/, /text/];

using the getter setter functions with the node-slimerjs bridge 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");

@wmhilton @chettam @adidoo-MT

openrijal commented 8 years ago

any updates on this? @pharzan @wmhilton @chettam @adidoo-MT