Hi,
How do I get ProxyServer running with WebDriver when is instantiated at start.
In pom:
<thucydides.version>0.9.239</thucydides.version>
<dependency>
<groupId>net.thucydides</groupId>
<artifactId>thucydides-core</artifactId>
<version>${thucydides.version}</version>
</dependency>
<dependency>
<groupId>net.thucydides</groupId>
<artifactId>thucydides-junit</artifactId>
<version>${thucydides.version}</version>
</dependency>
<dependency>
<groupId>net.thucydides</groupId>
<artifactId>thucydides-browsermob-plugin</artifactId>
<version>${thucydides.version}</version>
</dependency>
I have tried with:
ClasspathFixtureProviderService classpathFixtureProviderService = new ClasspathFixtureProviderService();
List<FixtureService> fixtureServices = classpathFixtureProviderService.getFixtureServices();
for(FixtureService fixtureService: fixtureServices){
if(fixtureService instanceof BrowserMobFixtureService ) {
BrowserMobFixtureService mob = (BrowserMobFixtureService) fixtureService;
ProxyServer proxy = mob.getProxyServer();
System.out.println(proxy == null);
}
}
But I get a null proxy. I need the proxy which is started with the webdriver
INFO 04/25 08:06:15 o.b.p.j.h.HttpServer - Version Jetty/5.1.x
INFO 04/25 08:06:15 o.b.p.j.u.Container - Started HttpContext[/,/]
INFO 04/25 08:06:15 o.b.p.j.h.SocketLis~ - Started SocketListener on
0.0.0.0:5555INFO 04/25 08:06:15 o.b.p.j.u.Container - Started org.browsermob.proxy.jetty.jetty.Server@75227d3
INFO 04/25 08:06:23 o.b.p.j.u.Credential - Checking Resource aliases
INFO 04/25 08:06:24 o.b.p.j.h.SocketLis~ - Started SocketListener on
0.0.0.0:62043
With the ProxyServer I want to get the Har file.
It is possible to have a method in Pages Configuration which to get the running ProxyServer?