"ERROR webdriver: Request failed with status 404 due to invalid session id: invalid sessio"

Viewed 3289

I am using webdriver.io for automation testing but i am getting error ERROR webdriver: Request failed with status 404 due to invalid session id: invalid session" and this is my code

    describe("Main Page",()=>{
    it("Verify List Items",()=>{
        browser.url("/");
        browser.pause(5000)

        const listExamples = $$("//div[@id='content']//ul/li");//> Double dollar to find all the elements
        expect (listExamples).toBeElementsArrayOfSize(45);
        
        console.log(listExamples);
    })
})
2 Answers

I found the answer actually from 14/04/2021 sync mode will not be supported anymore starting from Node.js v16 due to changes in Chromium. So I just used async and error was solved.

Related