首页 > 解决方案 > 在 Cypress 中无法使 XHR 请求出错,net::ERR_BLOCKED_BY_CLIENT

问题描述

我正在尝试实施一个测试来登录我的页面。

我使用柏树填充文本框并提交按钮。

没有柏树的网页可以工作。在柏树中,我无法登录。

我不明白为什么我不能用 cypress 登录。

这是我的测试脚本。

describe('click_test', () => {

    beforeEach(() => cy.visit('/'));

    it('set user Id, password and submit the button', () => {        
              cy.get('input').first().type('User')      
              cy.get('input[type = "password"]').first().type('***')    
               cy.contains('Giriş Yap').parent().click()    
       }) 
    });

控制台错误:POST net::ERR_BLOCKED_BY_CLIENT

标签: angularauthorizationcypress

解决方案


推荐阅读