How to set cypress to automatically detect proxy for automated executions?
I have a cypress test and its not loading the website properly. When I manually open the website using chrome, the website is working ok. Also I can find that my chrome proxy setting is set as "Automatically detect proxy"
When I check the proxy settings in Cypress, I am getting the below .
So my question is , how to configure Cypress to automatically detect the proxy while executing the automated tests?
The https://docs.cypress.io/guides/references/proxy-configuration is where to start. Two points of interest:
- "Proxy Auto-Configuration (PAC) files are not currently supported" (although I am not sure this is what Chrome uses when you check "auto-detect proxy").
- "When starting up after being installed, Cypress will attempt to load the proxy configured in the Windows registry by default".
My suggestion would be to contact your IT services to know what proxy address / port to use for internet browsers, then set that information in your OS as mentioned in the documentation (either by configuring the proxy if using Windows, or by setting environment variables HTTP_PROXY).