0

Newbie to wdio. But wonder why it's not easily getting along with typescript.

Error: TSError: ⨯ Unable to compile TypeScript:
tests/specs/basic/01_new_apartments.spec.ts(20,17): error TS2339: Property 'lala' does not exist on type 'BrowserObject'.
import { BASE_URL } from "../../constants";
import Index from "../../pageobjects/index.page";


describe('Export apartments', () => {
    let index : Index

    before( () => {
        index = new Index();
        browser.addCommand('lala', ()=>{
            console.log(123);
        })
    });

    it('should take screenshot', () => {

        browser.url(BASE_URL)
        browser.pause(3000);
        browser.lala();
    });

});

newBike
  • 12,989
  • 25
  • 88
  • 158
  • Did you _follow the [instructions](https://webdriver.io/docs/typescript.html#adding-custom-commands)_? – tehhowch Oct 28 '20 at 11:30

0 Answers0