Run tests with typescript
There's a tsconfig.json configuration file in your root directory (see full reference here), which provides compilerOptions and the included TypeScript files. Also there's a linter for TypeScript, which requires a tslint.json. This is all further configuration you need.
If you're IDE supports TypeScript, you'll get import suggestions
Classes (page objects)
Instead of writing a class with inheritance like this
you can write it way more simple like this
No 'self' workaround
in TypeScript the this context is clearer
This is not only TypeScript but the ES6 standard
Implementing in TypeScript brings type safety and improved IDE support. Writing page objects and tests it more comfortable, with a lower error rate. If you just start writing your own tests, give it a try!
- No labels