Java convert String to InputStream Standard Java convert String to InputStream import java.io.ByteArrayInputStream;
Selenium select and extract text all possible ways You can check also: Selenium locator contains text and firefox