-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I would like to run performance audit on specific page via browser.performAudit() function.
I have prepared wdio script as followed:
describe('Example', () => {
it('open example homepage', async () => {
await browser.url('https://example.com/')
})
it('performance audit', async () => { await browser.performAudit(await browser.getUrl()) })
I have got error:
[chrome 117.0.5938.89 windows #0-0] » \test\test.js
[chrome 117.0.5938.89 windows #0-0] Example
[chrome 117.0.5938.89 windows #0-0] ✓ open example homepage
[chrome 117.0.5938.89 windows #0-0] ✖ performance audit
[chrome 117.0.5938.89 windows #0-0]
[chrome 117.0.5938.89 windows #0-0] 1 passing (584ms)
[chrome 117.0.5938.89 windows #0-0] 1 failing
[chrome 117.0.5938.89 windows #0-0]
[chrome 117.0.5938.89 windows #0-0] 1) Example performance audit
[chrome 117.0.5938.89 windows #0-0] browser.performAudit is not a function
[chrome 117.0.5938.89 windows #0-0] TypeError: browser.performAudit is not a function
Can you help me how to implement and add performance audit into wdio script?