Is anyone out there working with the browsermob proxy on Selenium
Grid? It seems there's a bit of a chicken-and-egg situation whereby
you don't know what what machine a browser is launched on until after
it's launched, but you need to provide the browser proxy config when
starting the browser. I'm thinking this could be achieved with a
custom node proxy (in the grid sense) that would create the browsermob
proxy coincidentally with launching the browser. But if anyone else
has cracked this nut, I'd love to hear about it.
Thanks,
Kevin
Thanks for confirming that I'm not crazy. I guess I'll tackle this
one. I've been wanting a good real-world use case for my grid
workshop at this year's SeleniumConf, so I can kill two birds with one
stone.
The basic idea, however, is that you can configure the proxy class
used for each node in your grid. By default it's
org.openqa.grid.selenium.proxy.DefaultRemoteProxy. This class
basically serves as the interface between the grid hub and the node
and it has a series of callbacks that can be used. Notably there's a
beforeSession and afterSession. My initial thinking is the desired
proxy configuration would be provided as a capability, the
beforeSession handler would take care of establishing the proxy, and
the afterSession would handle tearing down the proxy. I just need to
make sure the lifecycle there works the way I expect. But if it
doesn't, I'll just update Selenium to give us what we need :-)
--
Kevin
Right now, the node doesn't talk to browsermob proxy at all. The
browser is configured to talk to the browsermob proxy through the
client. The node proxy is a proxy for the Selenium Server so the
responses sent back to the hub are routed to the appropriate client.
What I'm suggesting is that since the node proxy has the opportunity
to handle the client request and it's bound to the node, we should be
able to extend the node proxy to create a proxy on browsermob proxy at
the start of the session and destroy it at the end of the session.
This is even more confusing because in RC mode, Selenium Server itself
can be a proxy. But that doesn't come into play at all here.
--
Kevin
--
Kevin
Krishnan,It doesn't answer my question. However, I think both of us are saying the same :). Here is what I said ealier:It's possible and relatively easy to do this in the way mentioned below. Easy because you have a different machine in which proxy is setup. Now, I believe the assumption you are making here is, there will be only one proxy machine or a set of proxy machines and those will be static.My scenario is - I have n number of nodes in my grid. And I want to start the proxy for each machine in itself. As like, each machine will have its own proxy running within it. What do I achieve by doing it this way? - I don't have to rely on the network bandwidth for accessing the proxy. To do this, I would need to replace the proxy value with the value of proxy running in that machine. Its difficult (not impossible) to know which node will be used to run the test.
--
---
You received this message because you are subscribed to the Google Groups "BrowserMob Proxy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to browsermob-pro...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.