不久前,这些测试的脚本还可以完美地工作。据我所知,唯一的更改是URL。 这是一个有问题的测试。请注意,我们已经将URL替换为假URL。 我们已经尝试过重新安装Cypress。我们的支持文件中没有任何内容,等等。 在代码中没有任何地方我尝试设置属性。无论哪种方式,它似乎都会在运行测试之前抛出错误。 错误是: "cannot set property name of which has only a getter" ? /// <reference types="cypress" />
describe('Sign up', (
我为其中一个网页写了一些测试场景,但在自动重定向到一个特定ng-container的登录页面时仍然会遇到问题。我有3个测试场景,我运行它们的顺序并不重要-总是在第一个或第二个cookie删除包含登录数据的cookie并将用户重定向到登录页面之后。有什么方法可以防止重定向到另一个页面和删除cookie吗?
import LoginPage from "xxx/LoginPage.spec.js";
import CreateUser from "xxx/CreateUser.spec.js";
import Functions from "Cxxx/Fun
在Jenkins上遇到这个问题。我已经运行Cypress一个月了,没有任何问题。一旦我从5.3.0更新了版本,-> 5.5.0就开始出现这个问题。
注意:我的测试不在docker容器中。
We detected that the Chromium Renderer process just crashed.
This is the equivalent to seeing the 'sad face' when Chrome dies.
This can happen for a number of different reasons:
- You wrote an
当我尝试在Cypress中运行测试时,我得到了这个错误。有人能帮我解决这个问题吗? 这是我的index.js // Import commands.js using ES2015 syntax:
import './commands'
// Alternatively you can use CommonJS syntax:
// require('./commands')
Cypress.on('uncaught:exception', (err, runnable) => {
// returning false here p
我有一个使用Cucumber预处理器支持TypeScript的Cypress项目,它突然开始抛出以下异常:
TypeError: Cannot read properties of undefined (reading 'uid')
有时,当我更改到不同的工作区时,它会工作,但当我打开Cypress运行器本身时,甚至在Jenkins中执行时,这个错误都会再次产生。
Cypress Runner: (v8.4.0)
Jenkins控制台: (v8.7.0)
The function exported by the plugins file threw an error
我有20个自动测试和开放的sypress使用comand:
./node_modules/.bin/cypress open
而且柏树窗口也关闭了。控制台中有错误:
Error: ENAMETOOLONG: name too long, stat 'cypress/integration/cypress/integration/cypress/integration/cypress/integration/cypress/integration/cypress/integration/cypress/...'
cypress.json:
{
"baseUrl
在我的构建脚本中,我需要评估一个Cypress配置文件。我使用以下脚本:
let appdata = process.env.LOCALAPPDATA;
let version = `11.0.1`;
let src = `${appdata}/Cypress/Cache/${version}/Cypress/resources/app/node_modules/@packages/data-context/src`;
const DataContext = require(`${src}/DataContext.js`).DataContext;
const ProjectConfigMan
我有一个create-react-app应用程序,经常使用jest进行测试,但我正在缓慢地迁移到cypress。
问题是,当我运行我的jest测试时,它包含了我的cypress测试,并给出了一个错误。
ReferenceError: Cypress is not defined
如何使我的jest (命名约定*.test.js)测试忽略我的cypress测试(通常称为*.spec.js)?
在示例测试中,我调用了一个减法函数并测试了‘Cypress.io -spec’,如下所示。这工作得很好。但是,我们如何调用在不同的js文件中编写的相同的subtract函数,例如Cypress测试中的'/basetest.js‘?
describe ('Calling a function', function(){
it('Call the Subtract function and asert the calculation', function(){
cy
.wrap({sub: subValues})
.invoke(