我有一个通过 test cafe studio 运行的测试,该测试进入网站,点击页面并暂停。在暂停期间,我希望弹出一个消息框并显示一条评论(用作解释网站上发生的事情的教学工具)。我已经尝试了几种选择,但它们都不起作用。我对此很陌生,可能会遗漏一些东西?
提前致谢!这是我的简单测试代码
import { Selector, ClientFunction } from 'testcafe'; 从“弹出窗口”导入{弹出窗口};夹具svdemo manager cockpit 。第http://localhost/SvManagerCockpit/home .httpAuth({用户名: 'myusernamehere',密码: 'mypasswordhere',域: 'mydomainhere'});
test('Pause', async t => { await t .click(Selector('span').withText('Machine OEE Dashboard')) .wait(10000); popup.alert({ content: 'Hello!' } ); 返回 1; });
await t
.expect(alert()).eql(1);
}); 我希望在 .js 测试中插入一些代码以在浏览器中生成一个消息框/对话框。
慕盖茨4494581
相关分类