Poly Moly
Poly Moly

Reputation: 31

Testcafe: Getting error: Cannot implicitly resolve the test run

I'm writing the script in testcafe to parse the response and verify, that response contains required text, nut getting an error: Cannot implicitly resolve the test run in the context of which the test controller action should be executed. Use test function's 't' argument instead.

test ('Control server info', async () => {

    await t
      .click(infoserver.serverinfoButton)
      .click(infoserver.getInfoButton)

    await infoserver.resultText.value.then( async (res) => {
        const infoParse = JSON.parse(res);
        console.log(infoParse);

    await t
    .expect(infoParse.username).contains('Google:[email protected]');

    });
});

Upvotes: 3

Views: 2728

Answers (1)

VysakhMohan
VysakhMohan

Reputation: 567

Try

test ('Control server info', async t => {

//test code
});

Upvotes: 7

Related Questions