【发布时间】:2019-07-07 01:32:51
【问题描述】:
我是第一次使用开源 TestCafe。我有 3 个 JS 动态变量需要在夹具中使用,但由于变量名称更改,我不知道如何输入它们。
//I have this code, the 3 variables below are dynamic and I do not know how to
//define them for the test to work
import { Selector } from 'testcafe';
fixture `Getting Started`;
.page `http://mypage/example`;
test('My First Test', async t => {
await t
.typeText('#_19ea794cf2c5da', 'John.Smith@mail.com') //e-mail
.typeText('#_1f5041dd561eb6', 'John Smith') //name
.typeText('#_1ba6e017739c70', '5515675800') //telephone
});
连接已执行,但在第一个动态变量中标记错误
【问题讨论】:
标签: automated-tests open-source e2e-testing web-testing testcafe