问题描述
在运行赛普拉斯测试时,我无法加载被测应用程序的页面.经过长期调查,我发现赛普拉斯正在使用公司代理,该代理根据文档
** 3)使用插件文件**
检查插件文件夹中的index.js
config.env
查看是否在这些位置(或从测试)中设置了代理变量,然后尝试将其删除
I'm having trouble to load the page of my application under test when running Cypress test. After long investigation I figured out that Cypress is using a corporate proxy which is retrieved from my environment variables according to documentation https://docs.cypress.io/guides/references/proxy-configuration.html#View-proxy-settings-in-CypressThis proxy is no longer active so I remove it from my environment variables but Cypress is still using it even after restarting both cypress and VsCode.I also tried the following solutions:clean up Cypress cache folderuninstall Cypress and install it again
Installing Cypress on a teammate's machine who never had the proxy environment variables configured worked fine.My question is: Why Cypress is still retrieving the HTTP_PROXY env var which no longer exists ? How to remove this from Cypress settings ?
Thanks a lot for your help.
environment variables are available in cypress through :
1) Approach 1
adding environment variable through terminal or command line as : CYPRESS_
eg : CYPRESS_TEST create variable TEST
you can see all the variables by typing set in cmd and env in shell , search for cypress in that
2)Approach 2:
to environment file or config file:
check if these files has proxy environment variables:
**3) using plugin file **
check the index.js in plugin folder for
config.env
see if you have proxy variable set in any of these location ( Or from tests ) and try to remove it
这篇关于删除赛普拉斯的默认代理设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!