0

当我运行 cypress 代码时,它会自动重定向到主页,并填写登录部分,如何停止?

it('SubInterfaces',function(){
    
    cy.url().should('include','/spoke/create')

    cy.get('input').eq(15).type('cypress')
    cy.get('input').eq(16).type('34.43.45.56')
    cy.get('input').eq(17).type('22')
    cy.get('input').eq(18).type('345')

})

重定向

4

1 回答 1

1

尝试cy.visit('/desired-URL');在函数开始时使用。

于 2021-09-27T13:10:19.770 回答