I want to getText() using By.id or By.cssSelector.
I managed to solve my problem by doing getAttribute("value"), but I don\'t understand why getText() doesn
Simple answer - it's designed this way. getText() parses the content of the tag (i.e. its innerText), which is obviously empty for inputs.
getText()