Playwright , Failure in After hook , fails test

48 views Asked by At

In Playwright , I have grpup of 4 tests executed under same describe , in aftereach I close tabs to go home page , Intermittently sometimes steps in afterEach fails , it marks test as failed , is there any configuration to avoid it

Thanks Gayathri

test.describe("Playwright", () => {
    test.beforeAll(async ({browser}) => {
        Login to application
        go to home page
    });

test("File menu", async () => {
 validate file menu}); 

  test("Edit menu", async () => {
     validate Edit menu});

  test("Tools menu", async () => {
     validate Tools menu});

  test.AfterEach(async ({browser}) => {
            go to home page
        });

After executing test 2 , if after each , it makes test2 as failed

0

There are 0 answers