Hey Ashmita, to get the typed text from a textbox, you can use getAttribute(“value”) method by passing arg as value. Value attribute stores the typed text of the textbox element. See the following example to know better:
String typedText = driver.findElement(By.xpath("xpath_textbox")).getAttribute("value"));