An Azure service that enables developers and testers to generate insights on how to improve the performance, scalability, and capacity usage of their application
Hello Mateusz Baranowicz,
Greetings! Thanks for raising this question in Q&A forum.
What you are describing matches a known limitation rather than something specific to your code. When you use ConnectAsync to attach to an already running remote browser (which is exactly how Playwright Workspaces works), the per context Proxy option behaves differently than when you launch a browser locally. Playwright's own documentation notes that for Chromium, the browser needs to be started with the proxy enabled at the launch level for a per context Proxy override to actually take effect, if the browser was started without that, the context level Proxy setting is silently ignored rather than throwing an error. Since Playwright Workspaces controls how the remote browser is started on their infrastructure, you do not have control over that launch step, which lines up exactly with what you are seeing, the traffic just falls back to the workspace's own egress IP instead of failing.
Here is what I would check and do.
Confirm this is not a code issue on your side Your code itself looks correct, Proxy with Server, Username and Password is the right shape for BrowserNewContextOptions. This is not something you can fix by changing how you call NewContextAsync.
Be aware this is a documented Playwright SDK limitation too Separate from the Azure service itself, there is an existing open issue in the Playwright .NET project about proxy configuration not being supported when using ConnectAsync or ConnectOverCdpAsync against a remote browser. This affects any remote browser connection scenario, not just Playwright Workspaces specifically.
Use exposeNetwork only for the opposite direction Playwright Workspaces does have an exposeNetwork setting in playwright.service.config.ts, but that is used to expose your local machine's network (like localhost) to the cloud browser, it is not a mechanism for routing the cloud browser's outbound traffic through your own custom proxy. So this will not solve what you are trying to do.
Treat this as a behavior change that needs official confirmation Since you mention this previously worked and failed loudly with invalid credentials before, but now silently passes through, this looks like a possible regression on the service side rather than expected behavior. I would recommend opening a formal support request through the Azure Playwright Workspaces support channel so the product team can confirm whether proxy support was intentionally changed, since this is the kind of definitive yes or no answer that needs to come from the team that controls how the remote browsers are launched.
You can find the general configuration and troubleshooting reference here: https://learn.microsoft.com/en-us/azure/app-testing/playwright-workspaces/troubleshoot-test-run-failures
If this answer helps you kindly accept the answer which will help others who have similar questions
Best Regards,
Jerald Felix.