Search code examples
node.jswebdriver-io

Why webdriverio can't find element?


await this.browser.url(url);
await this.browser.pause(5000);
const link = await $('a');

It opens the URL but after a pause I get the following error:

TypeError: Cannot read property 'isDevTools' of undefined 

how to fix this?


Solution

  • Just need to use $ as browser object funtion

    const link = await this.browser.$('a');