0

I am using the following example to add proxy browsermob with Selenide and Selenium. I used the this link.

I run it with Eclipse and I a successfully running it. but when I tried it with Maven. I have the following Error:

location: package net.lightbody.bmp.proxymaven cannot find symbol symbol: class ProxyServer

My Pom.xml:

<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>com.codeborne</groupId>
        <artifactId>selenide</artifactId>
        <version>3.5.1</version>
        <scope>test</scope>
    </dependency>

     <dependency>
    <groupId>net.lightbody.bmp</groupId>
    <artifactId>browsermob-core</artifactId>
    <version>2.1.1</version>
    <scope>test</scope>
</dependency>


</dependencies>
Hana90
  • 915
  • 3
  • 16
  • 36

1 Answers1

0

Short answer: Replace the browsermob-core dependency with browsermob-core-legacy, and your code will compile and run.

Long answer: BrowserMob Proxy has been almost completely rewritten using LittleProxy, which is faster, more stable, and supports more features than the legacy code you're currently using. I highly recommend upgrading to the new implementation; see the readme on github for information on the new interface.

At the very least, I would encourage you to use the "legacy adapter" class that wraps the old ProxyServer interface with a LittleProxy implementation. See the readme for details.

Jason Hoetger
  • 5,650
  • 2
  • 13
  • 14