Skip to content

Cannot get browsermob to return the entries #27

Description

@jfkhoury
  • Running Selenium server locally on port 4444
  • Running Browsermob on port 8080 (default)
  • Using selenium-webdriver npm package to run my selenium tests for the Firefox browser
  • Calling the cbHAR by setting captureContent, captureHeaders and captureBinaryContent to true.
  • Running a local express server and pointing the proxy and selenium to that server: 127.0.0.1:9191 (I even tried a regular domain like yahoo.com)

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);
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions