dequelabs / axe-core-npm

Mozilla Public License 2.0
577 stars 65 forks source link

"@axe-core/webdriverio": "^4.9.0" consumes a lot of memory resulting in javascript heap out of memory issue #1044

Closed Sameer-Dhole closed 2 months ago

Sameer-Dhole commented 3 months ago

Product

webdriverio

Product Version

"@axe-core/webdriverio": "^4.9.0",

Latest Version

Issue Description

Expectation

Describe what you expected the product to do.

Actual

Describe what the product actually does.

How to Reproduce

Provide a code sample or link to a webpage that reproduces the issue. Without this, your issue may be closed without investigation.

Additional context

Any thing else we should know about the issue?

Zidious commented 3 months ago

Hey @Sameer-Dhole,

Are you able to provide more details on:

Thanks

Sameer-Dhole commented 3 months ago

Hi @Zidious , we are using the below snippet . If you observe the memory of the node process the memory doubles after every few iterations

import { browser } from '@wdio/globals'
import AxeBuilder from '@axe-core/webdriverio'

describe('Accessibility Test', () => {
    it('should get the accessibility results from a page @sameer', async () => {
        for(var i = 0; i < 100 ; i++){
            // let builder = new AxeBuilder({ client: browser, noSandbox: true })
            await browser.url('https://testingbot.com')
            let result = await new AxeBuilder({ client: browser }).analyze()
            console.log('Acessibility Results:', result)
            result = null
        }
    })
})

Can you please help us here

padmavemulapati commented 2 months ago

Closing as there is no issue reproducing