zzo / browsermob-node

Javascript bindings for browsermob-proxy
MIT License
81 stars 33 forks source link

Cannot get browsermob to return the entries #27

Open jfkhoury opened 7 years ago

jfkhoury commented 7 years ago

No matter what I try, the entries are always empty.

Here's a code snippet:

    proxy.cbHAR({
            name: "http://" + LOCAL_SERVER_URL,
            captureContent: true,
            captureHeaders: true,
            captureBinaryContent: true
        },
        runSeleniumScripts,
        function (error, data) {
            console.log("DATA:", data);
            // NOTE: data.entries is always an empty array!!
        });

        function runSeleniumScripts(proxy, callback) {
            var driver = 
                new selenium.Builder()
                    .usingServer('http://localhost:4444/wd/hub')
                    .forBrowser('firefox')
                    .setProxy(proxy)
                    .build();

            driver.get("http://" + LOCAL_SERVER_URL).then(callback).then(done);
        }
shkaper commented 7 years ago

@jfkhoury Have you figured out what's wrong? It looks like I'm stuck with the same problem.

jfkhoury commented 7 years ago

@shkaper It was too painful to deal with all those tools, servers and configurations. So I switched tools and built a small mini-framework on top of them, working perfectly, with no servers required. I am using the following:

I might open source the whole project, not sure yet.

Please let me know if you need more details. Good Luck!