Need help on below item.
I tried setting up the BMP but failing when I execute Java main method with below exception
Caused by: java.lang.ClassNotFoundException: net.lightbody.bmp.BrowserMobProxy
at java.net.URLClassLoader$1.run(Unknown Source)
I am able to compile the java code properly and I can see the jars in the maven dependency folder but as soon as I try to run the program, encountering the above eexception.
I only have one entry to my POM
<dependency>
<groupId>net.lightbody.bmp</groupId>
<artifactId>browsermob-core-littleproxy</artifactId>
<version>2.1.0-beta-1-SNAPSHOT</version>
<scope>test</scope>
</dependency>
And the code m trying to run is as below
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
BrowserMobProxy server = new BrowserMobProxyServer();
server.start(0);
int port = server.getPort();
// get the Selenium proxy object
Proxy proxy = ClientUtil.createSeleniumProxy(server);
// configure it as a desired capability
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.PROXY, proxy);
// start the browser up
WebDriver driver = new FirefoxDriver(capabilities);
// create a new HAR with the label "
yahoo.com"
// get the HAR data
Har har = server.getHar();
}