假设我有300个测试用例,其中100个失败了,现在我想再次运行这100个测试用例(注:我甚至用适当的选项重新运行了cypress测试用例,它甚至运行测试用例来查找片状测试用例)
现在,我在记事本或Excel工作表中列出了一个失败的100个测试用例列表,现在有任何机制可以在CYPRESS中运行这个测试用例吗?
如果我和
cypress run --spec=cypress/integration/one.sepc.ts,cypress/integration/two.spec.ts"
这100个测试用例将导致一个大字符串,它看起来像
cypress run --spec=cypress/
是否有方法计算Visio形状内的文本行数?比如列尼孔特?
我在Visio形状上尝试过Rowcount,但是它没有返回任何反映Visio形状中文本行的内容!下面是我创建的示例代码
Sub something()
Dim intRows
Dim vsoShape As Visio.Shape
Set vsoShape = ActiveWindow.Selection.PrimaryItem
intRows = vsoShape.RowCount(Visio.visSectionProp)
MsgBox intRows
End Sub
我最近看到了一篇博文:。它描述了一种应用程序公开其模型的方法,以便Cypress可以访问它,以便设置某些状态进行测试。
链接中的示例代码:
// app.jsx code
var model = new app.TodoModel('react-todos');
if (window.Cypress) {
window.model = model
}
我想在我的VueJS应用程序中尝试这种方法,但是我很难公开“模型”。
我知道可以像这里描述的那样公开Vuex存储:,但是我需要访问组件的data()。
那么,我如何才能公开例如HelloWorld.data.message可
我可以成功地上传.dbf、.prj、.shx和.shp文件,在ReactJs中生成shapefile。没有错误,请求顺利通过。当我用Cypress编写测试时,问题出现了,我得到了以下内容:
Error: unsupported shape type: 957
at new Shp (VM86 bundle.js:101829:33)
at VM86 bundle.js:101822:12
at async Promise.all (:4200/__/index 0)
at async generateShape (VM86 bundle.js:1929:18)
在Cypress中,我试图计算包含文本的元素(在本例中是li中有多少个按钮)。当使用"contains“时,返回的项目数总是等于一个,因为"contains”只给出包含搜索文本的文档中的第一个项。
cy.get('li')
.contains('button', 'Submit')
.its('length')
.then(elLength => {
// I want to test he
我和我的同事在我们的机器上运行相同的Cypress测试套件,但得到了不同的结果。 我们使用的Cypress版本是3.8.3。 当他们运行.\node_modules\.bin\cypress run时,所有测试都通过了。 但是当我尝试在我的机器上运行相同的命令时,其中一个测试失败了。 我得到以下错误消息: <failure message="cy.type() can only be called on a single element.
Your subject contained 8 elements." type="CypressError"&g
我读到了关于柏树的。在最后一部分中,作者在调用Cypress.env时重写了类型记录所要推断的类型。
这是我想要理解的片段。
export { };
declare global {
namespace Cypress {
export interface Cypress {
/**
* Returns all environment variables set with CYPRESS_ prefix or in "env" object in "cypress.json"
*
* @se
我有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
我为其中一个网页写了一些测试场景,但在自动重定向到一个特定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
有没有人能帮我解决这个Cypress错误? Cypress Error: Timed out retrying: expected '<div.sub-categories-list>' to be '0 visible'
This element '<div.sub-categories-list>' is not visible because it has CSS property: 'position: fixed' and its being covered by another elemen
我所处的情况是,我需要在cypress中使用for循环和If else块。
场景:一旦登录到应用程序,我需要读取元素的文本,该文本在下面的屏幕截图中四舍五入。
此元素将在我登录后20-90秒内出现,当我刷新屏幕时。所以我需要写这样的东西,等待元素,如果它出现,读取文本并返回值,如果没有等待10秒,重新加载页面,然后再进行处理。
function waitAndreload() {
for (let i = 0; i < 10; i++) {
cy.get("#ele").then(ele => {
if (ele.tex
当我在Cypress中运行以下Google测试时,我得到以下401错误消息:“unauthorized_client”:"unauthorized_client","error_description":“未经授权”。用户成龙( Jackie )能够通过谷歌( Google )手动登录,但出于某种原因,这个测试在Cypress上失败了。在看完它之后,我和我的队友认为这可能与当我们打开它时Cypress给我们的端口有关。有人知道如何覆盖Cypress提供的端口,而不是给Cypress我们想要的端口吗?除非有人知道问题可能是什么,否则我们会采取的下一条路线?谢谢。