0

I'm using Selenium for automation with C#. I'm currently running the automation against production together with BrowserMob to stop third party modals displaying whilst running the automation. This is working perfectly.

I now need to target pre-production which is handled by a proxy. I can confirm that when using the proxy address the automation launches the browser and hits the pre-production server as expected. I can confirm this because we have the server address as a html comment in the source code.

My problem is that the blacklist of third parties is then not working when targeting pre-production.

Can anyone help/ suggest how to resolve this please? Let me know if there's more information you need.

Many thanks,

C# Code example

ProxyServer = new Server(serverProxyPath, 6666);
ProxyServer.Start();
var httpClient = ProxyServer.CreateProxy();

httpClient.Blacklist(@".*thirdpartydomain.com.*", (int)HttpStatusCode.NotFound);

var proxy = new Proxy
{
   HttpProxy = "1.2.3.4:8080",
   SslProxy = "1.2.3.4:8080"
};

sketch to demonstrate the problem

Rachel
  • 1
  • 2

0 Answers0