Answer the question
In order to leave comments, you need to log in
Errors when re-running puppeteer + mocha tests?
The issue is that when you run the tests again, the error “Error: No node found for selector:” is thrown.
Although before the tests passed without errors.
The code in the tests and the application did not change.
An example of writing code:
it("Отображение Техника не найдена", async () => {
await page.waitFor(2500);
await page.click("#header > div.tm-basicnav.uk-sticky > div > div > div.one.uk-first-column > a")
await page.waitFor(2500);
await page.type("#find-home-index-input", "wsedfrtgyhujik")
await page.waitFor(2500);
await page.click("#catalog-items-extra .uk-width-auto button")
await page.waitFor(2500);
const element = await page.$(".uk-h3");
const text = await page.evaluate(element => element.textContent, element);
expect(text).to.include('Техника не найдена')
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question