Type Inference and Basic Types in Kotlin
Introduction
In our first post, we explored a small Selenium test written in Kotlin and highlighted several language features that make test code more concise and expressive. But there was one feature working behind the scenes that we didn't explicitly call out: type inference.
If you copied the example into IntelliJ IDEA and had Function return types inlay hints enabled (Settings → Editor → Inlay Hints → Types → Kotlin → Function return types), you might have noticed the Unit keyword appearing after the login function signature:

In this post, we'll explore what type inference is, how it works in Kotlin, and cover the basic types you'll encounter most frequently when writing test automation code. Understanding these fundamentals will make the rest of your Kotlin journey much smoother.
