How to obtain the page title using Selenium webdriver?

We can obtain the page title using Selenium webdriver. The method getTitle() is used to obtain the present page title and then we can get the result in the console. Syntax t = driver.getTitle(); Let us find the title of the current page