Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  7] [ 6]  / answers: 1 / hits: 26982  / 7 Years ago, mon, november 20, 2017, 12:00:00

Is it possible to setup cypress.io to access pages through a proxy?



I have a proxy that I need to go through, in order to test my application.
Is there anyway to configure cypress.io to honour the standard HTTP_PROXY environment variables.. or is there some other setup that is required?


More From » node.js

 Answers
5

Update:


This is now well documented at:
https://docs.cypress.io/guides/references/proxy-configuration.html


Unix


export HTTP_PROXY=http://my-company-proxy.com

Windows


set HTTP_PROXY=http://my-company-proxy.com



There is a Cypress issue open to track this: https://github.com/cypress-io/cypress/issues/1469


This covers many of the common issues with getting through a corporate proxy and ways of working around them.


The following is an excerpt from the issue:



Setting Environment Variables


Set HTTP_PROXY and/or HTTPS_PROXY to your corporate proxy


HTTP_PROXY=http://my-proxy-address cypress run

Set NO_PROXY for localhost to prevent it from hitting corporate proxy


NO_PROXY=localhost cypress run

Other workarounds


For cy.visit()



  • Enable permissions in the Cypress chrome extension

  • Check the Chrome ProxyMode if you have administration rights

  • Try using Electron


For Download



  • Try the direct download if you're having issues during install.

  • Workaround for install using CYPRESS_BINARY_VERSION.


For accessing 'Runs' tab in Test Runner


If you need to set up a project, you have to do it in this tab.
Fortunately, you should only need to do this once. Try to do this once
outside of the corporate proxy then you should be good to go.



[#55890] Thursday, November 16, 2017, 7 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
gabriel

Total Points: 323
Total Questions: 107
Total Answers: 108

Location: Federated States of Micronesia
Member since Sun, May 16, 2021
3 Years ago
;