黄瓜/硒返回承诺错误

时间:2020-07-22 02:04:29

标签: selenium cucumberjs

我是黄瓜/硒新手,正在测试用户登陆网页时的情况。我被抛出此错误...当我删除承诺时,它会起作用。

startPromise.then(function () {

    Given('User lands on {string}', async function (url) {
        await this.driver.get(url);
    });

}).then(function () {
// more code

这引发了错误

(node:6228) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'push' of undefined

test.feature

Scenario: Test
        Given User lands on "https://www.google.com"

0 个答案:

没有答案