import { Observable, of } from "rxjs";
// And if I try to return like this
return Observable.of(this.purposes);
Run Code Online (Sandbox Code Playgroud)
我收到一个错误说明,'''类型'不存在'Observable'属性'
我尝试使用window.open()打开PDF文件,但窗口会自动打开和关闭,文件会像任何其他文件一样下载.如何在新标签页中打开PDF文件?FYI没有安装广告拦截器
当我执行
cy.get('#fsp-name').clear().type('random text');
Run Code Online (Sandbox Code Playgroud)
如果文本已经有值可以说'assd asd adsdsd'并且我执行上面的命令我得到类似于'random textassd'的东西
我也尝试使用
cy.get('#fsp-name').clear().should('have.value', '').type('random text');
Run Code Online (Sandbox Code Playgroud)
它在一段时间内起作用,在其他时候它抱怨它不等于 ' '。
我正在尝试在每个循环中执行此操作,如下所示
const data = [
{selector:'#name', newValue: 'John'},
{selector:'#phone', newValue: '1234567'}
];
cy.wrap(data).each(field => {
cy.get(field.selector).clear().should('have.value', '').type(field.newValue);
cy.contains('Save').click();
cy.visit('/abc/sdd');
cy.get(field.selector).invoke('val').should('equal', field.newValue);
});
Run Code Online (Sandbox Code Playgroud)