Hi,i faced a problem while replaying a script created for yahoomail page.The XPath statement to enter value in the "To" text field , is not working.Following are the XPath statements i used.
At the first try i used
<tr>
<td>type</td>
<td>to</td>
<td>[email protected]</td>
</tr>
Second try was this statement
<tr>
<td>type</td>
<td>//div[@id= 'toid']/textarea[@id= 'to'][@name= 'to']</td>
<td>[email protected]</td>
</tr>
Third try was this
<tr>
<td>typeKeysAndWait</td>
<td>//div[@ id= 'composebox']/div[@id= 'toid']/textarea[@id= 'to'][@name= 'to']</td>
<td>[email protected]</td>
</tr>
The result was like
[error] Element //div[@ id= 'composebox']/div[@id= 'toid']/textarea[@id= 'to'][@name= 'to'] not found
similar result was obtained in the previous attempts. Later when i tried
<tr>
<td>type</td>
<td>css=textarea.txtfield</td>
<td>[email protected]</td>
</tr>
mail id was entered into the text field ,and the script worked perfectly.what might be the reason.Any thoughts.?
I am adding the XPath statements
<div id="composepage">
<div id="composebox" class="roundcorner">
<div id="errorContainer"/>
<input type="hidden" name="defFromAddress" value="[email protected]"/>
<div class="fields row">
</div>
<div id="toid" class="row">
<label id="compose_to" for="to">
</label>
<textarea id="to" class="txtfield" name="to" autocomplete="off" tabindex="1" style="overflow: hidden; height: 19px;"/>
</div>