I am trying to sendKeys to the fields in an inline popup. company_name, contact_surname and contact_first_name. There are no iframes. I tried windowhandler also, but that did not work. Here is my code snippet and Please find the HTML code below::
driver.findElement(By.xpath("//input[@name='company_name']")).sendKeys("Ginger Bread");
driver.findElement(By.name("contact_first_name")).sendKeys("Ingrid");
driver.findElement(By.name("contact_surname")).sendKeys("Cumberbridge");
HTML Code:
<div id="ibox_content" style="overflow: auto; height: 322px;"><div id="quickCreateForm" style="background:silver; padding:4px; border:1px solid white; width:95%;">
<form>
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tbody><tr><td colspan="2" align="center">
<input type="button" value="Create" class="button" onclick="return quickCreate(this, true); ">
<input type="button" value="Close" class="button" onclick="iBox.hide();">
</td></tr>
<tr><td align="right" valign="top"><strong>Company:</strong></td>
<td align="left" valign="top" nowrap="">
<input type="text" name="company_name" value="" size="15" maxlength="120">
</td></tr>
<tr><td align="right" valign="top"><strong>First Name:</strong></td>
<td align="left" valign="top">
<input type="text" name="contact_first_name" value="" size="15" maxlength="120">
</td></tr>
<tr><td align="right" valign="top"><strong>Last Name:</strong></td>
<td align="left" valign="top">
<input type="text" name="contact_surname" value="" size="15" maxlength="120">
</td></tr>
</tbody></table>
</form>
</div></div>