The SessionId class in Selenium webdriver can be used to acquire the webdriver session id. A session id is a unique number assigned by the server to the webdriver. The webdriver uses this number to establish connection with the browser.