How to use getText and get an attribute in Selenium WebDriver
<p>Below are separate <code>textboxt1</code> IDs for getting the text:</p>
<pre><code>WebElement Text = driver.findElement(By.id(&quot;incident.number&quot;));
String result = Text.getText();
</code></pre>
<p>How can I write the code for getting the values from gettext?</p>
<p>Below are <code>textbox2</code> id:</p>
<pre><code>driver.findElement(By.id(&quot;38240a5edb5912000c91d540cf9619b9_text&quot;));
</code></pre>
<p>I want to get the value from <code>textbox1</code> to <code>textbox2</code>. How can I get the attributes from getText?</p>